src/ReturnTypeErrorMessage.php
private function tpl(): string
    {
        if (interface_exists($this->type)) {
            return 'Return value of %s must implement interface %s, %s returned';
        }

        if (class_exists($this->type)) {
            return 'Return value of %s must be an instance of %s, %s returned';
        }

        if ($this->type == 'callable') {
            return 'Return value of %s must be %s, %s returned';
        }

        return 'Return value of %s must be of the type %s, %s returned';
    }
private function tpl(): string
    {
        if (interface_exists($this->type)) {
            return 'Return value of %s must implement interface %s, %s returned';
        }

        if (class_exists($this->type)) {
            return 'Return value of %s must be an instance of %s, %s returned';
        }

        if ($this->type == 'callable') {
            return 'Return value of %s must be %s, %s returned';
        }

        return 'Return value of %s must be of the type %s, %s returned';
    }
private function tpl ( ) : string { if ( interface_exists ( $ this -> type ) ) { return 'Return value of %s must implement interface %s, %s returned' ; } if ( class_exists ( $ this -> type ) ) { return 'Return value of %s must be an instance of %s, %s returned' ; } if ( $ this -> type == 'callable' ) { return 'Return value of %s must be %s, %s returned' ; } return 'Return value of %s must be of the type %s, %s returned' ; }
Return the template of the error message accoring to the expected type.

@return string
Return the template of the error message accoring to the expected type .