application/Libraries/Core.php
/**
     * Check **required** number of parameters for controller method
     * using Reflection API.
     * 
     * @param object $controller Controller containing method
     * @param string $method Name of method
     * @return int $required Number of required Parameters
     */
Check **required** number of parameters for controller method
using Reflection API.

@param object $controller Controller containing method
@param string $method Name of method
@return int $required Number of required Parameters
Check ** required ** number of parameters for controller method using Reflection API . @param object $controller Controller containing method @param string $method Name of method @return int $required Number of required Parameters
private function requiredArgCount(object $controller, string $method): int {
        $method = new ReflectionMethod($controller, $method);
        $required = 0;
        foreach ($method->getParameters() as $val) 
            if(!$val->isDefaultValueAvailable()) $required++;
        return $required;
    }
private function requiredArgCount ( object $ controller , string $ method ) : int { $ method = new ReflectionMethod ( $ controller , $ method ) ; $ required = 0 ; foreach ( $ method -> getParameters ( ) as $ val ) if ( ! $ val -> isDefaultValueAvailable ( ) ) $ required ++ ; return $ required ; }
Check **required** number of parameters for controller method
 using Reflection API.
Check ** required ** number of parameters for controller method using Reflection API .