protected function executeRule($user, $item, $params)
    {
        if ($item->ruleName === null) {
            return resolve(true);
        }
        return $this->getRule($item->ruleName)->then(
            function($rule) use ($user, $item, $params) {
                if ($rule instanceof Rule) {
                    return $rule->execute($user, $item, $params);
                }
                return reject(false);
            }
        )->then(null, function() use ($item) {
            throw new InvalidConfigException("Rule not found: {$item->ruleName}");
        });
    }
protected function executeRule($user, $item, $params)
    {
        if ($item->ruleName === null) {
            return resolve(true);
        }
        return $this->getRule($item->ruleName)->then(
            function($rule) use ($user, $item, $params) {
                if ($rule instanceof Rule) {
                    return $rule->execute($user, $item, $params);
                }
                return reject(false);
            }
        )->then(null, function() use ($item) {
            throw new InvalidConfigException("Rule not found: {$item->ruleName}");
        });
    }
protected function executeRule ( $ user , $ item , $ params ) { if ( $ item -> ruleName === null ) { return resolve ( true ) ; } return $ this -> getRule ( $ item -> ruleName ) -> then ( function ( $ rule ) use ( $ user , $ item , $ params ) { if ( $ rule instanceof Rule ) { return $ rule -> execute ( $ user , $ item , $ params ) ; } return reject ( false ) ; } ) -> then ( null , function ( ) use ( $ item ) { throw new InvalidConfigException ( "Rule not found: {$item->ruleName}" ) ; } ) ; }
Executes the rule associated with the specified auth item.

If the item does not specify a rule, this method will return true. Otherwise, it will
return the value of [[Rule::execute()]].

@param string|int $user the user ID. This should be either an integer or a string representing
the unique identifier of a user. See [[\yii\web\User::id]].
@param Item $item the auth item that needs to execute its rule
@param array $params parameters passed to [[CheckAccessInterface::checkAccess()]] and will be passed to the rule
@return ExtendedPromiseInterface with bool the return value of [[Rule::execute()]]. If the auth item does not specify a rule, true will be returned.
Executes the rule associated with the specified auth item .