| Total Complexity | 6 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 90.91% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | final class CompositePresenter implements AttributePresenterInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @param AttributePresenterInterface[] $presenters |
||
| 13 | */ |
||
| 14 | 2 | public function __construct(private array $presenters) |
|
| 16 | 2 | } |
|
| 17 | |||
| 18 | /** |
||
| 19 | * @inheritDoc |
||
| 20 | */ |
||
| 21 | 2 | public function present(ReflectionClass $class, array $attributes): iterable |
|
| 22 | { |
||
| 23 | 1 | $this->validatePresenters(); |
|
| 24 | 1 | foreach ($this->presenters as $presenter) { |
|
| 25 | 1 | yield $presenter->present($class, $attributes); |
|
| 26 | } |
||
| 27 | 1 | } |
|
| 28 | |||
| 29 | 1 | private function validatePresenters(): void |
|
| 34 | } |
||
| 35 | } |
||
| 38 |