src/Core/Router.php
protected function getActionArguments($class, $action)
    {
        $method = new \ReflectionMethod($class, $action);
        $this->action = $method;

        $parameters = $method->getParameters();

        $result = [];

        foreach ($parameters as $parameter) {
            $attribute = new ActionAttribute();
            $attribute->name = $parameter->getName();
            $attribute->isRequired = !$parameter->isDefaultValueAvailable();
            if (!$attribute->isRequired) {
                $attribute->defaultValue = $parameter->getDefaultValue();
            }
            $result[] = $attribute;
        }

        return $result;
    }
protected function getActionArguments($class, $action)
    {
        $method = new \ReflectionMethod($class, $action);
        $this->action = $method;

        $parameters = $method->getParameters();

        $result = [];

        foreach ($parameters as $parameter) {
            $attribute = new ActionAttribute();
            $attribute->name = $parameter->getName();
            $attribute->isRequired = !$parameter->isDefaultValueAvailable();
            if (!$attribute->isRequired) {
                $attribute->defaultValue = $parameter->getDefaultValue();
            }
            $result[] = $attribute;
        }

        return $result;
    }
protected function getActionArguments ( $ class , $ action ) { $ method = new \ ReflectionMethod ( $ class , $ action ) ; $ this -> action = $ method ; $ parameters = $ method -> getParameters ( ) ; $ result = [ ] ; foreach ( $ parameters as $ parameter ) { $ attribute = new ActionAttribute ( ) ; $ attribute -> name = $ parameter -> getName ( ) ; $ attribute -> isRequired = ! $ parameter -> isDefaultValueAvailable ( ) ; if ( ! $ attribute -> isRequired ) { $ attribute -> defaultValue = $ parameter -> getDefaultValue ( ) ; } $ result [ ] = $ attribute ; } return $ result ; }
It goes through the parameters of the method and checks for the default value and requirement

@param string $class
@param string $action
@return ActionAttribute[]
@throws \ReflectionException
It goes through the parameters of the method and checks for the default value and requirement