Supported Versions: PHP 4 >= 4.0.4, PHP 5, PHP 7, PHP 8
Finds whether a variable is null
is_null(mixed $value): bool
                $policy$user$ability$arguments

            
);



            if (! 
is_null($result)) {

                return 
$result;

            }
            $user$ability$arguments

        
);



        if (
is_null($result)) {

            
$result $this->callAuthCallback($user$ability$arguments);

        }
    protected function canBeCalledWithUser($user$class$method null)

    {

        if (! 
is_null($user)) {

            return 
true;

        }
            return true;

        }



        if (! 
is_null($method)) {

            return 
$this->methodAllowsGuests($class$method);

        }
    protected function parameterAllowsGuests($parameter)

    {

        return (
$parameter->hasType() && $parameter->allowsNull()) ||

               (
$parameter->isDefaultValueAvailable() && is_null($parameter->getDefaultValue()));

    }
                continue;

            }



            if (! 
is_null($result $before($user$ability$arguments))) {

                return 
$result;

            }

        }
    protected function resolveAuthCallback($user$ability, array $arguments)

    {

        if (isset(
$arguments[0]) &&

            ! 
is_null($policy $this->getPolicyFor($arguments[0])) &&

            
$callback $this->resolvePolicyCallback($user$ability$arguments$policy)) {

            return 
$callback;

        }
            if (! is_null($result)) {

                return 
$result;

            }
    {

        
$config $this->getConfig($name);



        if (
is_null($config)) {

            throw new 
InvalidArgumentException("Auth guard [{$name}] is not defined.");

        }
    public function createUserProvider($provider null)

    {

        if (
is_null($config $this->getProviderConfiguration($provider))) {

            return;

        }
    protected function getGenericUser($user)

    {

        if (! 
is_null($user)) {

            return new 
GenericUser((array) $user);

        }

    }
    protected function newModelQuery($model null)

    {

        return 
is_null($model)

                ? 
$this->createModel()->newQuery()

                : 
$model->newQuery();

    }
    public function authenticate()

    {

        if (! 
is_null($user $this->user())) {

            return 
$user;

        }
    public function hasUser()

    {

        return ! 
is_null($this->user);

    }
    public function check()

    {

        return ! 
is_null($this->user());

    }