Upgrade to Laravel 9 (#4413)
Co-authored-by: DaneEveritt <dane@daneeveritt.com>
This commit is contained in:
parent
95e15d2c8a
commit
cbcf62086f
573 changed files with 4387 additions and 9411 deletions
|
@ -4,14 +4,10 @@ if (!function_exists('is_digit')) {
|
|||
/**
|
||||
* Deal with normal (and irritating) PHP behavior to determine if
|
||||
* a value is a non-float positive integer.
|
||||
*
|
||||
* @param mixed $value
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
function is_digit($value)
|
||||
function is_digit(mixed $value): bool
|
||||
{
|
||||
return is_bool($value) ? false : ctype_digit(strval($value));
|
||||
return !is_bool($value) && ctype_digit(strval($value));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -19,14 +15,8 @@ if (!function_exists('object_get_strict')) {
|
|||
/**
|
||||
* Get an object using dot notation. An object key with a value of null is still considered valid
|
||||
* and will not trigger the response of a default value (unlike object_get).
|
||||
*
|
||||
* @param object $object
|
||||
* @param string $key
|
||||
* @param null $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function object_get_strict($object, $key, $default = null)
|
||||
function object_get_strict(object $object, ?string $key, $default = null): mixed
|
||||
{
|
||||
if (is_null($key) || trim($key) == '') {
|
||||
return $object;
|
||||
|
|
Reference in a new issue