We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e77a046 commit 8373d94Copy full SHA for 8373d94
helpers/presento.php
@@ -53,19 +53,14 @@ function get_from_array($map, string $node)
53
/**
54
* Check given value is multidimensional array
55
*
56
- * @param mixed $arr
+ * @param mixed $array
57
* @return bool
58
*/
59
- function is_collection($arr) : bool
+ function is_collection($array) : bool
60
{
61
- if (!is_array($arr)) {
62
- return false;
63
- }
64
-
65
- $first = reset($arr);
66
- //$key = key($first);
+ if (!is_array($array)) return false;
67
68
- return isset($first) && is_array($first);
+ return array_keys($array) === range(0, count($array) - 1);
69
}
70
71
0 commit comments