| Conditions | 7 |
| Paths | 5 |
| Total Lines | 21 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 12 |
| CRAP Score | 7 |
| Changes | 0 | ||
| 1 | <?php |
||
| 23 | 14 | public function enterNode(mixed $node, VisitorContext $ctx): mixed |
|
| 24 | { |
||
| 25 | 14 | if (!$node instanceof Tag) { |
|
| 26 | 14 | return null; |
|
| 27 | } |
||
| 28 | |||
| 29 | 5 | $flatten = []; |
|
| 30 | 5 | foreach ($node->nodes as $child) { |
|
| 31 | 5 | if ($child instanceof Block || $child instanceof Template || $child instanceof Aggregate) { |
|
| 32 | 1 | foreach ($child->nodes as $childNode) { |
|
| 33 | 1 | $flatten[] = $childNode; |
|
| 34 | } |
||
| 35 | 1 | continue; |
|
| 36 | } |
||
| 37 | |||
| 38 | 5 | $flatten[] = $child; |
|
| 39 | } |
||
| 40 | |||
| 41 | 5 | $node->nodes = $this->mergeRaw($flatten); |
|
|
|
|||
| 42 | |||
| 43 | 5 | return null; |
|
| 44 | } |
||
| 70 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..