Skip to content

Commit ed064d7

Browse files
committed
remove array_first/array_last helpers as they now defined by symfony
1 parent b88837a commit ed064d7

1 file changed

Lines changed: 0 additions & 30 deletions

File tree

src/Support/helpers-array.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -117,36 +117,6 @@ function array_except($array, $keys)
117117
}
118118
}
119119

120-
if (!function_exists('array_first')) {
121-
/**
122-
* Return the first element in an array passing a given truth test.
123-
*
124-
* @param array $array
125-
* @param callable|null $callback
126-
* @param mixed $default
127-
* @return mixed
128-
*/
129-
function array_first($array, ?callable $callback = null, $default = null)
130-
{
131-
return Arr::first($array, $callback, $default);
132-
}
133-
}
134-
135-
if (!function_exists('array_last')) {
136-
/**
137-
* Return the last element in an array passing a given truth test.
138-
*
139-
* @param array $array
140-
* @param callable|null $callback
141-
* @param mixed $default
142-
* @return mixed
143-
*/
144-
function array_last($array, ?callable $callback = null, $default = null)
145-
{
146-
return Arr::last($array, $callback, $default);
147-
}
148-
}
149-
150120
if (!function_exists('array_flatten')) {
151121
/**
152122
* Flatten a multi-dimensional array into a single level.

0 commit comments

Comments
 (0)