示例#1
0
 /**
  * addMethod
  *
  * @param MethodInterface $method
  *
  * @return void
  */
 public function addMethod(MethodInterface $method)
 {
     if ($method instanceof InterfaceMethod) {
         throw new InvalidArgumentException(sprintf('Trait method "%s" must not be instance of "InterfaceMethod".', $method->getName()));
     }
     parent::addMethod($method);
 }
示例#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);
 }