| Conditions | 5 |
| Paths | 2 |
| Total Lines | 26 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | protected function order() |
||
| 52 | { |
||
| 53 | |||
| 54 | $column = $this->getParamAdapter()->getColumn(); |
||
| 55 | $order = $this->getParamAdapter()->getOrder(); |
||
| 56 | |||
| 57 | if (!$column) { |
||
| 58 | return; |
||
| 59 | } |
||
| 60 | |||
| 61 | uasort($this->arraySource, function ($i, $j) use ($column, $order) { |
||
| 62 | |||
| 63 | $a = $i[$column]; |
||
| 64 | $b = $j[$column]; |
||
| 65 | |||
| 66 | $condition = ($order == 'asc') ? $a > $b : $a < $b; |
||
| 67 | |||
| 68 | if ($a == $b) { |
||
| 69 | return 0; |
||
| 70 | } elseif ($condition) { |
||
| 71 | return 1; |
||
| 72 | } else { |
||
| 73 | return -1; |
||
| 74 | } |
||
| 75 | }); |
||
| 76 | } |
||
| 77 | |||
| 84 |
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..