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

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

        $classDefinition = new ClassDefinition(
            new Identifier($className->shortName()->string()),
            ClassModifier::ABSTRACT_()
        );
        $classDefinition->add($this->generateGetMethod());
        $classDefinition->add($this->generateInstallMethod());
        $classDefinition->add($this->generateSetDummyModeMethod());
        $classDefinition->add($this->generateDummyModeMethod());
        $classDefinition->add($this->generateSetRuntimeGenerationMethod());
        $classDefinition->add($this->generateRuntimeGenerationMethod());
        $classDefinition->add($this->generateCreateValidatorMethod(
            $configuration
        ));
        $classDefinition->add($this->generateDefineValidatorMethod(
            $configuration
        ));
        $classDefinition->add($this->generateConfigurationMethod(
            $configuration
        ));

        $instancesProperty = new Property(
            new Identifier('instances'),
            AccessModifier::PRIVATE_(),
            true
        );
        $instancesProperty->setDefaultValue(
            new ArrayLiteral
        );
        $classDefinition->add($instancesProperty);

        $dummyModeProperty = new Property(
            new Identifier('dummyMode'),
            AccessModifier::PRIVATE_(),
            true
        );
        $dummyModeProperty->setDefaultValue(new Literal(false));
        $classDefinition->add($dummyModeProperty);

        $runtimeGenerationProperty = new Property(
            new Identifier('runtimeGeneration'),
            AccessModifier::PRIVATE_(),
            true
        );
        $runtimeGenerationProperty->setDefaultValue(new Literal(false));
        $classDefinition->add($runtimeGenerationProperty);

        $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('TypeCheck')
        ;

        $classDefinition = new ClassDefinition(
            new Identifier($className->shortName()->string()),
            ClassModifier::ABSTRACT_()
        );
        $classDefinition->add($this->generateGetMethod());
        $classDefinition->add($this->generateInstallMethod());
        $classDefinition->add($this->generateSetDummyModeMethod());
        $classDefinition->add($this->generateDummyModeMethod());
        $classDefinition->add($this->generateSetRuntimeGenerationMethod());
        $classDefinition->add($this->generateRuntimeGenerationMethod());
        $classDefinition->add($this->generateCreateValidatorMethod(
            $configuration
        ));
        $classDefinition->add($this->generateDefineValidatorMethod(
            $configuration
        ));
        $classDefinition->add($this->generateConfigurationMethod(
            $configuration
        ));

        $instancesProperty = new Property(
            new Identifier('instances'),
            AccessModifier::PRIVATE_(),
            true
        );
        $instancesProperty->setDefaultValue(
            new ArrayLiteral
        );
        $classDefinition->add($instancesProperty);

        $dummyModeProperty = new Property(
            new Identifier('dummyMode'),
            AccessModifier::PRIVATE_(),
            true
        );
        $dummyModeProperty->setDefaultValue(new Literal(false));
        $classDefinition->add($dummyModeProperty);

        $runtimeGenerationProperty = new Property(
            new Identifier('runtimeGeneration'),
            AccessModifier::PRIVATE_(),
            true
        );
        $runtimeGenerationProperty->setDefaultValue(new Literal(false));
        $classDefinition->add($runtimeGenerationProperty);

        $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