Skip to content

Commit c3fa550

Browse files
authored
Merge pull request #4189 from Laravel-Backpack/removed-is-countable-helper
Removed is countable helper
2 parents 4c21059 + 5b95565 commit c3fa550

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

src/helpers.php

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -222,21 +222,6 @@ function square_brackets_to_dots($string)
222222
}
223223
}
224224

225-
if (! function_exists('is_countable')) {
226-
/**
227-
* We need this because is_countable was only introduced in PHP 7.3,
228-
* and in PHP 7.2 you should check if count() argument is really countable.
229-
* This function may be removed in future if PHP >= 7.3 becomes a requirement.
230-
*
231-
* @param $obj
232-
* @return bool
233-
*/
234-
function is_countable($obj)
235-
{
236-
return is_array($obj) || $obj instanceof Countable;
237-
}
238-
}
239-
240225
if (! function_exists('old_empty_or_null')) {
241226
/**
242227
* This method is an alternative to Laravel's old() helper, which mistakenly

0 commit comments

Comments
 (0)