Total Complexity | 2 |
Total Lines | 23 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
10 | class AuthorExists extends Rule |
||
11 | { |
||
12 | /** @var string */ |
||
13 | protected $message = "Author should exist"; |
||
14 | /** @var AuthorRepositoryInterface */ |
||
15 | protected AuthorRepositoryInterface $authorRepository; |
||
16 | |||
17 | /** |
||
18 | * AuthorExists constructor. |
||
19 | * @param AuthorRepositoryInterface $authorRepository |
||
20 | */ |
||
21 | 2 | public function __construct(AuthorRepositoryInterface $authorRepository) |
|
24 | 2 | } |
|
25 | |||
26 | /** |
||
27 | * @param mixed $value |
||
28 | * @return bool |
||
29 | */ |
||
30 | 2 | public function check($value): bool |
|
35 |