/** * @throws InvalidArgumentException if no InterfaceMethod is passed as * argument. * * {@inheritdoc} */ public function addMethod(MethodInterface $method) { if (!$method instanceof InterfaceMethod) { throw new InvalidArgumentException(sprintf('Method "%s" must be instance of "InterfaceMethod".', $method->getName())); } parent::addMethod($method); }
/** * {@inheritdoc} */ public function addMethod(MethodInterface $method) { if ($method instanceof InterfaceMethod) { throw new InvalidArgumentException(sprintf('Class method %s must not be instance of "InterfaceMethod".', $method->getName())); } AbstractWriter::addMethod($method); }