| Total Complexity | 8 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class OutputRenderer implements SchemaRenderer |
||
| 10 | { |
||
| 11 | /** @var Renderer[] */ |
||
| 12 | private array $renderers = []; |
||
| 13 | private Formatter $formatter; |
||
| 14 | |||
| 15 | public function __construct(Formatter $formatter, array $renderers = []) |
||
| 16 | { |
||
| 17 | $this->formatter = $formatter; |
||
| 18 | $this->addRenderer(...$renderers); |
||
| 19 | } |
||
| 20 | |||
| 21 | final public function addRenderer(Renderer ...$renderers): void |
||
| 25 | } |
||
| 26 | } |
||
| 27 | |||
| 28 | final public function render(array $schema): string |
||
| 35 | } |
||
| 36 | |||
| 37 | private function renderRole(array $schema, string $role): string |
||
| 50 |