Conditions | 5 |
Paths | 3 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 5 |
Changes | 0 |
1 | <?php |
||
51 | 5 | private function mergeRaw(array $nodes): array |
|
52 | { |
||
53 | 5 | $result = []; |
|
54 | 5 | foreach ($nodes as $node) { |
|
55 | if ( |
||
56 | 5 | $node instanceof Raw |
|
57 | 5 | && isset($result[\count($result) - 1]) |
|
58 | 5 | && $result[\count($result) - 1] instanceof Raw |
|
59 | ) { |
||
60 | 1 | $result[\count($result) - 1]->content .= $node->content; |
|
61 | 1 | continue; |
|
62 | } |
||
63 | |||
64 | 5 | $result[] = $node; |
|
65 | } |
||
66 | |||
67 | 5 | return $result; |
|
68 | } |
||
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..