Conditions | 4 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
30 | public function removeOrder($fieldToRemove) |
||
31 | { |
||
32 | $order = []; |
||
33 | if (count($this->fields) > 0) { |
||
34 | foreach ($this->getOrders() as $field => $direction) { |
||
35 | if (strtolower($fieldToRemove) === strtolower($field)) { |
||
36 | continue; |
||
37 | } |
||
38 | $order[$field] = $direction; |
||
39 | } |
||
40 | } |
||
41 | $this->fields = $order; |
||
42 | } |
||
97 |