mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
Merge pull request #498 from danilopolani/fix/types
Fix phpstan static errors
This commit is contained in:
@ -4,6 +4,8 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace Pest\Factories\Attributes;
|
namespace Pest\Factories\Attributes;
|
||||||
|
|
||||||
|
use Pest\Factories\TestCaseMethodFactory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @internal
|
* @internal
|
||||||
*/
|
*/
|
||||||
@ -15,4 +17,14 @@ abstract class Attribute
|
|||||||
* @var bool
|
* @var bool
|
||||||
*/
|
*/
|
||||||
public const ABOVE_CLASS = false;
|
public const ABOVE_CLASS = false;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param array<int, string> $attributes
|
||||||
|
*
|
||||||
|
* @return array<int, string>
|
||||||
|
*/
|
||||||
|
public function __invoke(TestCaseMethodFactory $method, array $attributes): array // @phpstan-ignore-line
|
||||||
|
{
|
||||||
|
return $attributes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -138,7 +138,6 @@ final class TestCaseMethodFactory
|
|||||||
}
|
}
|
||||||
|
|
||||||
foreach ($attributesToUse as $attribute) {
|
foreach ($attributesToUse as $attribute) {
|
||||||
/** @phpstan-ignore-next-line */
|
|
||||||
$attributes = (new $attribute())->__invoke($this, $attributes);
|
$attributes = (new $attribute())->__invoke($this, $attributes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user