mirror of
https://github.com/pestphp/pest.git
synced 2026-03-06 15:57:21 +01:00
28 lines
593 B
PHP
28 lines
593 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace Pest\Factories\Annotations;
|
|
|
|
use Pest\Contracts\AddsAnnotations;
|
|
use Pest\Factories\Covers\CoversNothing as CoversNothingFactory;
|
|
use Pest\Factories\TestCaseMethodFactory;
|
|
|
|
/**
|
|
* @internal
|
|
*/
|
|
final class CoversNothing implements AddsAnnotations
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function __invoke(TestCaseMethodFactory $method, array $annotations): array
|
|
{
|
|
if (($method->covers[0] ?? null) instanceof CoversNothingFactory) {
|
|
$annotations[] = '@coversNothing';
|
|
}
|
|
|
|
return $annotations;
|
|
}
|
|
}
|