Total Complexity | 3 |
Total Lines | 24 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
31 | class ControllerCollection implements Countable |
||
32 | { |
||
33 | use CollectionTrait; |
||
34 | |||
35 | /** |
||
36 | * Collection constructor. |
||
37 | * |
||
38 | * @phpstan-param IteratorAggregate<int, ControllerInterface> $items |
||
39 | */ |
||
40 | 93 | public function __construct( |
|
41 | #[TaggedIterator('app.rest.controller')] |
||
42 | protected readonly IteratorAggregate $items, |
||
43 | protected readonly LoggerInterface $logger, |
||
44 | ) { |
||
45 | 93 | } |
|
46 | |||
47 | 1 | public function getErrorMessage(string $className): string |
|
48 | { |
||
49 | 1 | return sprintf('REST controller \'%s\' does not exist', $className); |
|
50 | } |
||
51 | |||
52 | 90 | public function filter(string $className): Closure |
|
55 | } |
||
56 | } |
||
57 |