public function faults()
    {
        $faultReflection = new \ReflectionClass('Supervisor\Exception\Fault');
        $faults = array_flip($faultReflection->getConstants());

        $this->taskCleanDir([__DIR__.'/src/Exception/Fault'])->run();

        foreach ($faults as $code => $name) {
            $exName = $this->createExceptionName($name);
            $file = sprintf(__DIR__.'/src/Exception/Fault/%s.php', $exName);

            $this->taskWriteToFile($file)
                ->textFromFile(__DIR__.'/resources/FaultTemplate.php')
                ->place('FAULT_NAME', $name)
                ->place('FaultName', $exName)
                ->run();
        }
    }
public function faults()
    {
        $faultReflection = new \ReflectionClass('Supervisor\Exception\Fault');
        $faults = array_flip($faultReflection->getConstants());

        $this->taskCleanDir([__DIR__.'/src/Exception/Fault'])->run();

        foreach ($faults as $code => $name) {
            $exName = $this->createExceptionName($name);
            $file = sprintf(__DIR__.'/src/Exception/Fault/%s.php', $exName);

            $this->taskWriteToFile($file)
                ->textFromFile(__DIR__.'/resources/FaultTemplate.php')
                ->place('FAULT_NAME', $name)
                ->place('FaultName', $exName)
                ->run();
        }
    }
public function faults ( ) { $ faultReflection = new \ ReflectionClass ( 'Supervisor\Exception\Fault' ) ; $ faults = array_flip ( $ faultReflection -> getConstants ( ) ) ; $ this -> taskCleanDir ( [ __DIR__ . '/src/Exception/Fault' ] ) -> run ( ) ; foreach ( $ faults as $ code => $ name ) { $ exName = $ this -> createExceptionName ( $ name ) ; $ file = sprintf ( __DIR__ . '/src/Exception/Fault/%s.php' , $ exName ) ; $ this -> taskWriteToFile ( $ file ) -> textFromFile ( __DIR__ . '/resources/FaultTemplate.php' ) -> place ( 'FAULT_NAME' , $ name ) -> place ( 'FaultName' , $ exName ) -> run ( ) ; } }
Generates fault exception classes
Generates fault exception classes