src/main/php/ClassProxyMethodHandler.php
private function canNot(string $message, string $invalidMethod): string
    {
        if (isset($this->_voidMethods[$invalidMethod])) {
            $reason = 'is declared as returning void.';
        } elseif (method_exists($this, $invalidMethod)) {
            $reason = 'is not applicable for mapping.';
        } else {
            $reason = 'does not exist. Probably a typo?';
        }

        return sprintf(
                'Trying to %s method %s, but it %s',
                $message,
                $this->completeNameOf($invalidMethod),
                $reason
        );
    }
private function canNot(string $message, string $invalidMethod): string
    {
        if (isset($this->_voidMethods[$invalidMethod])) {
            $reason = 'is declared as returning void.';
        } elseif (method_exists($this, $invalidMethod)) {
            $reason = 'is not applicable for mapping.';
        } else {
            $reason = 'does not exist. Probably a typo?';
        }

        return sprintf(
                'Trying to %s method %s, but it %s',
                $message,
                $this->completeNameOf($invalidMethod),
                $reason
        );
    }
private function canNot ( string $ message , string $ invalidMethod ) : string { if ( isset ( $ this -> _voidMethods [ $ invalidMethod ] ) ) { $ reason = 'is declared as returning void.' ; } elseif ( method_exists ( $ this , $ invalidMethod ) ) { $ reason = 'is not applicable for mapping.' ; } else { $ reason = 'does not exist. Probably a typo?' ; } return sprintf ( 'Trying to %s method %s, but it %s' , $ message , $ this -> completeNameOf ( $ invalidMethod ) , $ reason ) ; }
creates complete error message that invalid method can not be used

@param  string  $message
@param  string  $invalidMethod
creates complete error message that invalid method can not be used