public static function undefinedMethod($target, string $method): self
    {
        return new self(sprintf(
            'Method %s::%s() does not exist.',
            get_class($target),
            $method
        ));
    }
public static function undefinedMethod($target, string $method): self
    {
        return new self(sprintf(
            'Method %s::%s() does not exist.',
            get_class($target),
            $method
        ));
    }
public static function undefinedMethod ( $ target , string $ method ) : self { return new self ( sprintf ( 'Method %s::%s() does not exist.' , get_class ( $ target ) , $ method ) ) ; }
Creates an instance for an undefined method call.

@param object $target
@param string $method

@return self
Creates an instance for an undefined method call .