| Conditions | 4 | 
| Paths | 4 | 
| Total Lines | 16 | 
| Code Lines | 10 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 10 | 
| CRAP Score | 4 | 
| Changes | 0 | ||
| 1 | <?php | ||
| 52 | 5 | public function toArray(): array | |
| 53 |     { | ||
| 54 | 5 | $array = []; | |
| 55 | 5 |         foreach ($this->nodesImportance as $nodes) { | |
| 56 | 5 |             foreach ($nodes as $node) { | |
| 57 | 5 |                 if ($node instanceof Node) { | |
| 58 | 5 | $object[$node->getTag()] = $node->getContent(); | |
| 59 |                 } else { | ||
| 60 | 5 | $object[self::IMPORTANCE] = $node; | |
| 61 | 5 | $array[] = $object; | |
| 62 | 5 | $object = []; | |
| 63 | } | ||
| 64 | } | ||
| 65 | } | ||
| 66 | |||
| 67 | 5 | return $array; | |
| 68 | } | ||
| 70 |