protected function generateTraitMethods()
    {
        if (empty($this->_traitMethodsAliases)) {
            return;
        }

        $this->addProperty(
            '___classMocker_traitMethods',
            $this->_traitMethodsAliases,
            PropertyGenerator::FLAG_PRIVATE | PropertyGenerator::FLAG_STATIC
        );

        foreach (array_keys($this->_traitMethodsAliases) as $methodName) {

            if (!$this->canGenerateMethod($methodName)) {
                continue;
            }

            if (!$this->isValidTraitMethod($methodName)) {
                throw new \RuntimeException(
                    sprintf(
                        "Trait magic method %s::%s() is not valid, use %s() instead",
                        $this->getName(),
                        $methodName,
                        '_' . $methodName
                    )
                );
            }

            $this->generateMethod($methodName);
        }
    }
protected function generateTraitMethods()
    {
        if (empty($this->_traitMethodsAliases)) {
            return;
        }

        $this->addProperty(
            '___classMocker_traitMethods',
            $this->_traitMethodsAliases,
            PropertyGenerator::FLAG_PRIVATE | PropertyGenerator::FLAG_STATIC
        );

        foreach (array_keys($this->_traitMethodsAliases) as $methodName) {

            if (!$this->canGenerateMethod($methodName)) {
                continue;
            }

            if (!$this->isValidTraitMethod($methodName)) {
                throw new \RuntimeException(
                    sprintf(
                        "Trait magic method %s::%s() is not valid, use %s() instead",
                        $this->getName(),
                        $methodName,
                        '_' . $methodName
                    )
                );
            }

            $this->generateMethod($methodName);
        }
    }
protected function generateTraitMethods ( ) { if ( empty ( $ this -> _traitMethodsAliases ) ) { return ; } $ this -> addProperty ( '___classMocker_traitMethods' , $ this -> _traitMethodsAliases , PropertyGenerator :: FLAG_PRIVATE | PropertyGenerator :: FLAG_STATIC ) ; foreach ( array_keys ( $ this -> _traitMethodsAliases ) as $ methodName ) { if ( ! $ this -> canGenerateMethod ( $ methodName ) ) { continue ; } if ( ! $ this -> isValidTraitMethod ( $ methodName ) ) { throw new \ RuntimeException ( sprintf ( "Trait magic method %s::%s() is not valid, use %s() instead" , $ this -> getName ( ) , $ methodName , '_' . $ methodName ) ) ; } $ this -> generateMethod ( $ methodName ) ; } }
Generate foot print of all methods specified by all
traits registered to this mock class

Register all trait methods to the private static
property ___classMocker_traitMethods which is accessible to
the base mock object and used to call all trait methods in order

@see \JSiefer\ClassMocker\Mock\BaseMock::mergeTraitMethods()

@return void
Generate foot print of all methods specified by all traits registered to this mock class