| Conditions | 3 |
| Paths | 3 |
| Total Lines | 11 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | 1 | public function build(&$parent = null): ?Compact |
|
| 34 | { |
||
| 35 | 1 | if (is_null($this->value)) { |
|
| 36 | 1 | return null; |
|
| 37 | } |
||
| 38 | 1 | if ($this->value instanceof NodeGeneric) { |
|
| 39 | 1 | $this->value = new NodeList($this->value); |
|
| 40 | 1 | $this->value->type = NodeList::SEQUENCE; |
|
| 41 | } |
||
| 42 | 1 | $arr = (array) $this->value->build(); |
|
| 43 | 1 | return new Compact($arr); |
|
| 44 | } |
||
| 46 |