public function setTraitClass($traitClass)
    {
        if ($this->isObjectNameValid($traitClass) !== true) {
            throw new InvalidArgumentException('The name of the trait to use is not valid.');
        }

        $this->traitClass = $traitClass;

        return $this;
    }
public function setTraitClass($traitClass)
    {
        if ($this->isObjectNameValid($traitClass) !== true) {
            throw new InvalidArgumentException('The name of the trait to use is not valid.');
        }

        $this->traitClass = $traitClass;

        return $this;
    }
public function setTraitClass ( $ traitClass ) { if ( $ this -> isObjectNameValid ( $ traitClass ) !== true ) { throw new InvalidArgumentException ( 'The name of the trait to use is not valid.' ) ; } $ this -> traitClass = $ traitClass ; return $ this ; }
Set the trait name to use.

@param string $traitClass The trait class to use.
@return \Wingu\OctopusCore\CodeGenerator\PHP\OOP\UseTraitGenerator
@throws \Wingu\OctopusCore\CodeGenerator\Exceptions\InvalidArgumentException If the use is not valid.
Set the trait name to use .