| Total Complexity | 7 |
| Total Lines | 42 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | class Printer implements PrinterInterface |
||
| 10 | { |
||
| 11 | /** |
||
| 12 | * @var array|WriterInterface[] |
||
| 13 | */ |
||
| 14 | protected $writers; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Printer constructor. |
||
| 18 | * @param array|WriterInterface[] $writers |
||
| 19 | */ |
||
| 20 | public function __construct($writers) |
||
| 21 | { |
||
| 22 | $this->writers = $writers; |
||
| 23 | } |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @inheritdoc |
||
| 27 | * @throws LanguageException |
||
| 28 | */ |
||
| 29 | public function print(NodeInterface $node): string |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @param NodeInterface $node |
||
| 40 | * @return WriterInterface|null |
||
| 41 | */ |
||
| 42 | protected function getWriter(NodeInterface $node): ?WriterInterface |
||
| 51 | } |
||
| 52 | } |
||
| 53 |