public function throwExceptionIfMissingOn($context, $message = null)
    {
        if ($message === null) {
            $message = 'The method [' . $this->name() . '] does not exist on ['
                . static::getClassName($context) . '].';
        }

        if (! $this->existsOn($context)) {
            $this->throwException($message);
        }

        return $this;
    }
public function throwExceptionIfMissingOn($context, $message = null)
    {
        if ($message === null) {
            $message = 'The method [' . $this->name() . '] does not exist on ['
                . static::getClassName($context) . '].';
        }

        if (! $this->existsOn($context)) {
            $this->throwException($message);
        }

        return $this;
    }
public function throwExceptionIfMissingOn ( $ context , $ message = null ) { if ( $ message === null ) { $ message = 'The method [' . $ this -> name ( ) . '] does not exist on [' . static :: getClassName ( $ context ) . '].' ; } if ( ! $ this -> existsOn ( $ context ) ) { $ this -> throwException ( $ message ) ; } return $ this ; }
Throw a BadMethodCallException if the method represented by this
instance does not exist

@param object|string $context The context to check in for method
existance
@param string|null   $message The customizable exception message

@return $this The current instance of this class for method chaining

@throws BadMethodCallException If the method represented by this
instance does not exist
Throw a BadMethodCallException if the method represented by this instance does not exist