@@ -189,7 +189,9 @@ discard block |
||
| 189 | 189 | $direction = Arrgh::getSortDirection(); |
| 190 | 190 | return function ($a, $b) use ($direction, $callable) { |
| 191 | 191 | $result = $callable($a, $b); |
| 192 | - if ($result === 0) return $direction; |
|
| 192 | + if ($result === 0) { |
|
| 193 | + return $direction; |
|
| 194 | + } |
|
| 193 | 195 | return $result; |
| 194 | 196 | }; |
| 195 | 197 | } |
@@ -611,8 +613,12 @@ discard block |
||
| 611 | 613 | */ |
| 612 | 614 | static private function arrgh_depth($array) |
| 613 | 615 | { |
| 614 | - if (empty($array) && is_array($array)) return 0; |
|
| 615 | - if (!Arrgh::arrgh_is_collection($array)) return null; |
|
| 616 | + if (empty($array) && is_array($array)) { |
|
| 617 | + return 0; |
|
| 618 | + } |
|
| 619 | + if (!Arrgh::arrgh_is_collection($array)) { |
|
| 620 | + return null; |
|
| 621 | + } |
|
| 616 | 622 | |
| 617 | 623 | $depth = 0; |
| 618 | 624 | $child = array_shift($array); |
@@ -29,6 +29,8 @@ |
||
| 29 | 29 | } |
| 30 | 30 | |
| 31 | 31 | // Define so it will not be defiend again |
| 32 | - if (!defined("ARRGH_IS_DEFINED")) define("ARRGH_IS_DEFINED", true); |
|
| 33 | -} |
|
| 32 | + if (!defined("ARRGH_IS_DEFINED")) { |
|
| 33 | + define("ARRGH_IS_DEFINED", true); |
|
| 34 | + } |
|
| 35 | + } |
|
| 34 | 36 | |