mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
fix linting
This commit is contained in:
@ -178,13 +178,11 @@ final class TestCall
|
|||||||
public function covers(string ...$classesOrFunctions): TestCall
|
public function covers(string ...$classesOrFunctions): TestCall
|
||||||
{
|
{
|
||||||
foreach ($classesOrFunctions as $classOrFunction) {
|
foreach ($classesOrFunctions as $classOrFunction) {
|
||||||
$isClass = class_exists($classOrFunction);
|
$isClass = class_exists($classOrFunction);
|
||||||
$isMethod = function_exists($classOrFunction);
|
$isMethod = function_exists($classOrFunction);
|
||||||
|
|
||||||
if (!$isClass && !$isMethod) {
|
if (!$isClass && !$isMethod) {
|
||||||
throw new InvalidArgumentException(
|
throw new InvalidArgumentException(sprintf('No class or method named "%s" has been found.', $classOrFunction));
|
||||||
sprintf('No class or method named "%s" has been found.', $classOrFunction)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($isClass) {
|
if ($isClass) {
|
||||||
|
|||||||
@ -17,7 +17,9 @@ class TestCoversClass3
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
function testCoversFunction() { }
|
function testCoversFunction()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
it('uses the correct PHPUnit attribute for class', function () {
|
it('uses the correct PHPUnit attribute for class', function () {
|
||||||
$attributes = (new ReflectionClass($this))->getAttributes();
|
$attributes = (new ReflectionClass($this))->getAttributes();
|
||||||
|
|||||||
Reference in New Issue
Block a user