| Conditions | 2 |
| Paths | 1 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 39 | private function packagesAreSorted(array $packages) |
||
| 40 | { |
||
| 41 | $names = array_keys($packages); |
||
| 42 | $sortedNames = $names; |
||
| 43 | usort($sortedNames, function ($name1, $name2) { |
||
| 44 | if ('php' === $name2) { |
||
| 45 | return 1; |
||
| 46 | } |
||
| 47 | // TODO: ext-* |
||
| 48 | |||
| 49 | return strcmp($name1, $name2); |
||
| 50 | }); |
||
| 51 | |||
| 52 | return $sortedNames === $names; |
||
| 53 | } |
||
| 54 | } |
||
| 55 |
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..