| Total Complexity | 15 |
| Total Lines | 75 |
| Duplicated Lines | 0 % |
| Coverage | 76.67% |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | final class StemplerConfig extends InjectableConfig |
||
| 12 | { |
||
| 13 | public const CONFIG = 'views/stempler'; |
||
| 14 | |||
| 15 | protected array $config = [ |
||
| 16 | 'directives' => [], |
||
| 17 | 'processors' => [], |
||
| 18 | 'visitors' => [], |
||
| 19 | ]; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @return Autowire[] |
||
| 23 | */ |
||
| 24 | 42 | public function getDirectives(): array |
|
| 37 | } |
||
| 38 | |||
| 39 | /** |
||
| 40 | * @return Autowire[] |
||
| 41 | */ |
||
| 42 | 42 | public function getProcessors(): array |
|
| 43 | { |
||
| 44 | 42 | $processors = []; |
|
| 45 | 42 | foreach ($this->config['processors'] as $processor) { |
|
| 46 | 42 | if (is_object($processor) && !$processor instanceof Autowire) { |
|
| 47 | $processors[] = $processor; |
||
| 48 | continue; |
||
| 49 | } |
||
| 50 | |||
| 51 | 42 | $processors[] = $this->wire($processor); |
|
| 52 | } |
||
| 53 | |||
| 54 | 42 | return $processors; |
|
| 55 | } |
||
| 56 | |||
| 57 | 43 | public function getVisitors(int $stage): array |
|
| 70 | } |
||
| 71 | |||
| 72 | /** |
||
| 73 | * @throws ConfigException |
||
| 74 | */ |
||
| 75 | 49 | private function wire(mixed $item): Autowire |
|
| 88 |