@@ -17,6 +17,7 @@ |
||
| 17 | 17 | * @param array $input |
| 18 | 18 | * @param bool $only |
| 19 | 19 | * @param bool $allow_empty Should an empty $input return true |
| 20 | + * @param string $type |
|
| 20 | 21 | * @return bool |
| 21 | 22 | */ |
| 22 | 23 | private static function hasKeysByType($type, array $input, $only = false, $allow_empty = false) |
@@ -22,10 +22,10 @@ |
||
| 22 | 22 | private static function hasKeysByType($type, array $input, $only = false, $allow_empty = false) |
| 23 | 23 | { |
| 24 | 24 | if (!is_array($input)) { |
| 25 | - return false; |
|
| 25 | + return false; |
|
| 26 | 26 | } |
| 27 | 27 | if (!$input) { |
| 28 | - return $allow_empty; |
|
| 28 | + return $allow_empty; |
|
| 29 | 29 | } |
| 30 | 30 | $count = count(array_filter(array_keys($input), 'is_'.strtolower($type))); |
| 31 | 31 | return $only ? $count === count($input) : $count > 0; |
@@ -87,8 +87,8 @@ |
||
| 87 | 87 | { |
| 88 | 88 | $return = []; |
| 89 | 89 | $awr_func = $preserve_keys ? |
| 90 | - function ($v, $k) use (&$return) {$return[$k] = $v;} : |
|
| 91 | - function ($v) use (&$return) {$return[] = $v;} |
|
| 90 | + function($v, $k) use (&$return) {$return[$k] = $v; } : |
|
| 91 | + function($v) use (&$return) {$return[] = $v; } |
|
| 92 | 92 | ; |
| 93 | 93 | array_walk_recursive($input, $awr_func); |
| 94 | 94 | return $return; |