@@ -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 |
@@ -209,7 +209,9 @@ discard block |
||
209 | 209 | $direction = self::getSortDirection(); |
210 | 210 | return function ($a, $b) use ($direction, $callable) { |
211 | 211 | $result = $callable($a, $b); |
212 | - if ($result === 0) return $direction; |
|
212 | + if ($result === 0) { |
|
213 | + return $direction; |
|
214 | + } |
|
213 | 215 | return $result; |
214 | 216 | }; |
215 | 217 | } |
@@ -635,8 +637,12 @@ discard block |
||
635 | 637 | */ |
636 | 638 | private static function arrgh_depth($array) |
637 | 639 | { |
638 | - if (empty($array) && is_array($array)) return 0; |
|
639 | - if (!self::arrgh_is_collection($array)) return null; |
|
640 | + if (empty($array) && is_array($array)) { |
|
641 | + return 0; |
|
642 | + } |
|
643 | + if (!self::arrgh_is_collection($array)) { |
|
644 | + return null; |
|
645 | + } |
|
640 | 646 | |
641 | 647 | $depth = 0; |
642 | 648 | $child = array_shift($array); |