code cleanup

This commit is contained in:
Joel Male
2024-08-16 19:19:14 +10:00
parent 9a4b5382bd
commit 0ec0668bcf
4 changed files with 18 additions and 21 deletions
+5 -9
View File
@@ -25,15 +25,10 @@ public static function roundMode($config): int
}
/**
* check if array is multi dimensional array
* This will only check the first element of the array if it is still an array
* to decide that it is a multi dimensional, if you want to check the array strictly
* with all on its element, flag the second argument as true
*
* @param bool $recursive
* @return bool
* Check if array is multi dimensional array
* This will only check if the first element of the array is an array
*/
public static function isMultiArray($array, $recursive = false)
public static function isMultiArray(array $array, bool $recursive = false): bool
{
if ($recursive) {
return (count($array) == count($array, COUNT_RECURSIVE)) ? false : true;
@@ -45,8 +40,9 @@ public static function isMultiArray($array, $recursive = false)
return false;
}
}
}
return false;
}
/**