src/Controller/Component/AuthorizationComponent.php
protected function getDefaultAction(ServerRequest $request)
    {
        $action = $request->getParam('action');
        $name = $this->getConfig('actionMap.' . $action);

        if ($name === null) {
            return $action;
        }
        if (!is_string($name)) {
            $type = is_object($name) ? get_class($name) : gettype($name);
            $message = sprintf('Invalid action type for `%s`. Expected `string` or `null`, got `%s`.', $action, $type);
            throw new UnexpectedValueException($message);
        }

        return $name;
    }
protected function getDefaultAction(ServerRequest $request)
    {
        $action = $request->getParam('action');
        $name = $this->getConfig('actionMap.' . $action);

        if ($name === null) {
            return $action;
        }
        if (!is_string($name)) {
            $type = is_object($name) ? get_class($name) : gettype($name);
            $message = sprintf('Invalid action type for `%s`. Expected `string` or `null`, got `%s`.', $action, $type);
            throw new UnexpectedValueException($message);
        }

        return $name;
    }
protected function getDefaultAction ( ServerRequest $ request ) { $ action = $ request -> getParam ( 'action' ) ; $ name = $ this -> getConfig ( 'actionMap.' . $ action ) ; if ( $ name === null ) { return $ action ; } if ( ! is_string ( $ name ) ) { $ type = is_object ( $ name ) ? get_class ( $ name ) : gettype ( $ name ) ; $ message = sprintf ( 'Invalid action type for `%s`. Expected `string` or `null`, got `%s`.' , $ action , $ type ) ; throw new UnexpectedValueException ( $ message ) ; } return $ name ; }
Returns authorization action name for a controller action resolved from the request.

@param \Cake\Http\ServerRequest $request Server request.
@return string
@throws \UnexpectedValueException When invalid action type encountered.
Returns authorization action name for a controller action resolved from the request .