src/Permissions/AbstractPermission.php
protected function resolveConditions(Lock $lock, $action, $resource)
    {
        // If the given condition is a closure, execute it.
        if ($this->conditions instanceof Closure) {
            return call_user_func($this->conditions, $lock, $this, $action, $resource);
        }

        // If the conditions are an array of Condition objects, check them all.
        foreach ($this->conditions as $condition) {
            if (! $condition->assert($lock, $this, $action, $resource)) {
                return false;
            }
        }

        return true;
    }
protected function resolveConditions(Lock $lock, $action, $resource)
    {
        // If the given condition is a closure, execute it.
        if ($this->conditions instanceof Closure) {
            return call_user_func($this->conditions, $lock, $this, $action, $resource);
        }

        // If the conditions are an array of Condition objects, check them all.
        foreach ($this->conditions as $condition) {
            if (! $condition->assert($lock, $this, $action, $resource)) {
                return false;
            }
        }

        return true;
    }
protected function resolveConditions ( Lock $ lock , $ action , $ resource ) { // If the given condition is a closure, execute it. if ( $ this -> conditions instanceof Closure ) { return call_user_func ( $ this -> conditions , $ lock , $ this , $ action , $ resource ) ; } // If the conditions are an array of Condition objects, check them all. foreach ( $ this -> conditions as $ condition ) { if ( ! $ condition -> assert ( $ lock , $ this , $ action , $ resource ) ) { return false ; } } return true ; }
Check all the conditions and make sure they all return true

@param \BeatSwitch\Lock\Lock $lock
@param string $action
@param \BeatSwitch\Lock\Resources\Resource|null $resource
@return bool
Check all the conditions and make sure they all return true