Exemplo n.º 1
0
 /**
  * @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);
 }
Exemplo n.º 2
0
 /**
  * {@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);
 }