Use more standardized phpcs
This commit is contained in:
parent
a043071e3c
commit
c449ca5155
493 changed files with 1116 additions and 3903 deletions
|
@ -1,11 +1,12 @@
|
|||
<?php
|
||||
|
||||
if (! function_exists('is_digit')) {
|
||||
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)
|
||||
|
@ -14,14 +15,15 @@ if (! function_exists('is_digit')) {
|
|||
}
|
||||
}
|
||||
|
||||
if (! function_exists('object_get_strict')) {
|
||||
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
|
||||
* @param null $default
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
function object_get_strict($object, $key, $default = null)
|
||||
|
@ -31,7 +33,7 @@ if (! function_exists('object_get_strict')) {
|
|||
}
|
||||
|
||||
foreach (explode('.', $key) as $segment) {
|
||||
if (! is_object($object) || ! property_exists($object, $segment)) {
|
||||
if (!is_object($object) || !property_exists($object, $segment)) {
|
||||
return value($default);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue