Skip to content

Commit cab1183

Browse files
committed
Removed is_countable helper
1 parent 536d7c3 commit cab1183

File tree

1 file changed

+1
-16
lines changed

1 file changed

+1
-16
lines changed

src/helpers.php

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -232,22 +232,7 @@ function square_brackets_to_dots($string)
232232
}
233233
}
234234

235-
if (! function_exists('is_countable')) {
236-
/**
237-
* We need this because is_countable was only introduced in PHP 7.3,
238-
* and in PHP 7.2 you should check if count() argument is really countable.
239-
* This function may be removed in future if PHP >= 7.3 becomes a requirement.
240-
*
241-
* @param $obj
242-
* @return bool
243-
*/
244-
function is_countable($obj)
245-
{
246-
return is_array($obj) || $obj instanceof Countable;
247-
}
248-
}
249-
250-
if (! function_exists('old_empty_or_null')) {
235+
if (!function_exists('old_empty_or_null')) {
251236
/**
252237
* This method is an alternative to Laravel's old() helper, which mistakenly
253238
* returns NULL it two cases:

0 commit comments

Comments
 (0)