| Conditions | 4 |
| Paths | 6 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function __construct(array $list = null) { |
||
| 17 | if(empty($list)) { |
||
| 18 | $list = []; |
||
| 19 | } |
||
| 20 | |||
| 21 | foreach($list as $node) { |
||
| 22 | if(!($node instanceof Node)) { |
||
| 23 | throw new InvalidArgumentException('The array must contain only Node objects. "'.get_class($node).'" given.'); |
||
| 24 | } |
||
| 25 | } |
||
| 26 | |||
| 27 | $this->list = $list; |
||
| 28 | } |
||
| 29 | |||
| 47 | } |