public function addMethod(MethodGenerator $method)
    {
        $name = $method->getName();
        if (isset($this->methods[$name]) === true) {
            throw new InvalidArgumentException('Method name "' . $name . '" already added.');
        }

        $this->methods[$name] = $method;
    }
public function addMethod(MethodGenerator $method)
    {
        $name = $method->getName();
        if (isset($this->methods[$name]) === true) {
            throw new InvalidArgumentException('Method name "' . $name . '" already added.');
        }

        $this->methods[$name] = $method;
    }
public function addMethod ( MethodGenerator $ method ) { $ name = $ method -> getName ( ) ; if ( isset ( $ this -> methods [ $ name ] ) === true ) { throw new InvalidArgumentException ( 'Method name "' . $ name . '" already added.' ) ; } $ this -> methods [ $ name ] = $ method ; }
Add a method.

@param \Wingu\OctopusCore\CodeGenerator\PHP\OOP\MethodGenerator $method The method to add.
@throws \Wingu\OctopusCore\CodeGenerator\Exceptions\InvalidArgumentException If the method name already exists.
Add a method .