src/Eloquent/Typhoon/Generator/DummyValidatorGenerator.php
public function generateSyntaxTree(
        RuntimeConfiguration $configuration,
        &$className = null
    ) {
        $this->typeCheck->generateSyntaxTree(func_get_args());

        $className = $configuration
            ->validatorNamespace()
            ->joinAtoms('DummyValidator')
        ;

        $classDefinition = new ClassDefinition(
            new Identifier($className->shortName()->string())
        );
        $classDefinition->setParentName(
            QualifiedIdentifier::fromString('AbstractValidator')
        );
        $classDefinition->add($this->generateCallMethod());

        $primaryBlock = new PhpBlock;
        $primaryBlock->add(new NamespaceStatement(QualifiedIdentifier::fromString(
            $className->parent()->toRelative()->string()
        )));
        $primaryBlock->add($classDefinition);

        $syntaxTree = new SyntaxTree;
        $syntaxTree->add($primaryBlock);

        return $syntaxTree;
    }
public function generateSyntaxTree(
        RuntimeConfiguration $configuration,
        &$className = null
    ) {
        $this->typeCheck->generateSyntaxTree(func_get_args());

        $className = $configuration
            ->validatorNamespace()
            ->joinAtoms('DummyValidator')
        ;

        $classDefinition = new ClassDefinition(
            new Identifier($className->shortName()->string())
        );
        $classDefinition->setParentName(
            QualifiedIdentifier::fromString('AbstractValidator')
        );
        $classDefinition->add($this->generateCallMethod());

        $primaryBlock = new PhpBlock;
        $primaryBlock->add(new NamespaceStatement(QualifiedIdentifier::fromString(
            $className->parent()->toRelative()->string()
        )));
        $primaryBlock->add($classDefinition);

        $syntaxTree = new SyntaxTree;
        $syntaxTree->add($primaryBlock);

        return $syntaxTree;
    }
public function generateSyntaxTree ( RuntimeConfiguration $ configuration , & $ className = null ) { $ this -> typeCheck -> generateSyntaxTree ( func_get_args ( ) ) ; $ className = $ configuration -> validatorNamespace ( ) -> joinAtoms ( 'DummyValidator' ) ; $ classDefinition = new ClassDefinition ( new Identifier ( $ className -> shortName ( ) -> string ( ) ) ) ; $ classDefinition -> setParentName ( QualifiedIdentifier :: fromString ( 'AbstractValidator' ) ) ; $ classDefinition -> add ( $ this -> generateCallMethod ( ) ) ; $ primaryBlock = new PhpBlock ; $ primaryBlock -> add ( new NamespaceStatement ( QualifiedIdentifier :: fromString ( $ className -> parent ( ) -> toRelative ( ) -> string ( ) ) ) ) ; $ primaryBlock -> add ( $ classDefinition ) ; $ syntaxTree = new SyntaxTree ; $ syntaxTree -> add ( $ primaryBlock ) ; return $ syntaxTree ; }
@param RuntimeConfiguration $configuration
@param null                 &$className

@return SyntaxTree
@param RuntimeConfiguration $configuration @param null &$className