mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
This reverts commit cfc51d51f5
.
This commit is contained in:
@@ -86,23 +86,3 @@ if (!function_exists('set_debug')) {
|
||||
return $debug;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('array_pairs')) {
|
||||
/**
|
||||
* Get all consecutive pairs of values in an array.
|
||||
* [1,2,3,4] -> [[1,2],[2,3],[3,4]]
|
||||
*
|
||||
* @param array $array
|
||||
* @return array
|
||||
*/
|
||||
function array_pairs($array)
|
||||
{
|
||||
$pairs = [];
|
||||
|
||||
for ($i = 1; $i < count($array); $i++) {
|
||||
$pairs[] = [$array[$i - 1], $array[$i]];
|
||||
}
|
||||
|
||||
return $pairs;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user