src/Procedure.php
private function revert($output, $input, $style)
    {
        /* Revert commands in backwards order */
        for($n = count($this->commandsExecuted); $n > 0; $n--) {
            $command = $this->commandsExecuted[$n-1];

            /* Revert if possible */
            if($command->hasPublicMethod('revert')) {
                $output->writeLn("Reverting $command");
                $command->revert();
                continue;
            }
            $style->warning("Command {$command->getName()} cannot be reverted, revert method is not defined");
        }
        $this->commandsExecuted = [];
    }
private function revert($output, $input, $style)
    {
        /* Revert commands in backwards order */
        for($n = count($this->commandsExecuted); $n > 0; $n--) {
            $command = $this->commandsExecuted[$n-1];

            /* Revert if possible */
            if($command->hasPublicMethod('revert')) {
                $output->writeLn("Reverting $command");
                $command->revert();
                continue;
            }
            $style->warning("Command {$command->getName()} cannot be reverted, revert method is not defined");
        }
        $this->commandsExecuted = [];
    }
private function revert ( $ output , $ input , $ style ) { /* Revert commands in backwards order */ for ( $ n = count ( $ this -> commandsExecuted ) ; $ n > 0 ; $ n -- ) { $ command = $ this -> commandsExecuted [ $ n - 1 ] ; /* Revert if possible */ if ( $ command -> hasPublicMethod ( 'revert' ) ) { $ output -> writeLn ( "Reverting $command" ) ; $ command -> revert ( ) ; continue ; } $ style -> warning ( "Command {$command->getName()} cannot be reverted, revert method is not defined" ) ; } $ this -> commandsExecuted = [ ] ; }
Reverts executed commands
Reverts executed commands