| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 17 | public function __construct(array $handlers) |
||
| 18 | { |
||
| 19 | foreach ($handlers as $handler) { |
||
| 20 | if (!$handler instanceof AbstractNodeToArrayHandler) { |
||
| 21 | throw new \InvalidArgumentException("Handlers must extend AbstractNodeToArrayHandler!"); |
||
| 22 | } |
||
| 23 | |||
| 24 | $handler->setMainHandler($this); |
||
| 25 | $this->handlers[] = $handler; |
||
| 26 | } |
||
| 27 | } |
||
| 28 | |||
| 43 |