src/Analyse/Callback/Analyse/Objects/DebugMethods.php
protected function checkIfAccessible($data, $funcName, ReflectionClass $reflectionClass)
    {
        // We need to check if:
        // 1.) Method exists. It may be protected though.
        // 2.) Method can be called. There may be a magical method, though.
        // 3.) It's not blacklisted.
        if (method_exists($data, $funcName) === true &&
            is_callable(array($data, $funcName)) === true &&
            $this->pool->config->isAllowedDebugCall($data) === true) {
            // We need to check if the callable function requires any parameters.
            // We will not call those, because we simply can not provide them.
            $ref = $reflectionClass->getMethod($funcName);

            /** @var \ReflectionParameter $param */
            foreach ($ref->getParameters() as $param) {
                if ($param->isOptional() === false) {
                    // We've got a required parameter!
                    // We will not call this one.
                    return false;
                }
            }

            return true;
        }

        return false;
    }
protected function checkIfAccessible($data, $funcName, ReflectionClass $reflectionClass)
    {
        // We need to check if:
        // 1.) Method exists. It may be protected though.
        // 2.) Method can be called. There may be a magical method, though.
        // 3.) It's not blacklisted.
        if (method_exists($data, $funcName) === true &&
            is_callable(array($data, $funcName)) === true &&
            $this->pool->config->isAllowedDebugCall($data) === true) {
            // We need to check if the callable function requires any parameters.
            // We will not call those, because we simply can not provide them.
            $ref = $reflectionClass->getMethod($funcName);

            /** @var \ReflectionParameter $param */
            foreach ($ref->getParameters() as $param) {
                if ($param->isOptional() === false) {
                    // We've got a required parameter!
                    // We will not call this one.
                    return false;
                }
            }

            return true;
        }

        return false;
    }
protected function checkIfAccessible ( $ data , $ funcName , ReflectionClass $ reflectionClass ) { // We need to check if: // 1.) Method exists. It may be protected though. // 2.) Method can be called. There may be a magical method, though. // 3.) It's not blacklisted. if ( method_exists ( $ data , $ funcName ) === true && is_callable ( array ( $ data , $ funcName ) ) === true && $ this -> pool -> config -> isAllowedDebugCall ( $ data ) === true ) { // We need to check if the callable function requires any parameters. // We will not call those, because we simply can not provide them. $ ref = $ reflectionClass -> getMethod ( $ funcName ) ; /** @var \ReflectionParameter $param */ foreach ( $ ref -> getParameters ( ) as $ param ) { if ( $ param -> isOptional ( ) === false ) { // We've got a required parameter! // We will not call this one. return false ; } } return true ; } return false ; }
Check if we are allowed to access this class method as a debug method for this class.

@param mixed $data
The class that we are currently analysing.
@param string $funcName
The name of the function that we want to call.
@param ReflectionClass $reflectionClass
The reflection of the class that we are currently analysing.

@return boolean
Whether or not we are allowed toi access this method.
Check if we are allowed to access this class method as a debug method for this class .