public function run(
        Renamer $renamer,
        Scaffolder $scaffolder
    ) {
        $this->drawBanner();

        $child = $this->askForChildConfirmation();
        $replacements = $this->askForReplacements($child);

        if (! $child) {
            $preset = $this->askForPreset();
        }

        if ($this->askForConfirmation()) {
            if (isset($preset) && $preset !== 'none') {
                $scaffolder->build($preset);
            }

            $renamer->replace($replacements);

            $this->climate->backgroundLightGreen('Done. Cheers!');
        } else {
            $this->climate->backgroundRed('Shaking abored.');
        }
    }
public function run(
        Renamer $renamer,
        Scaffolder $scaffolder
    ) {
        $this->drawBanner();

        $child = $this->askForChildConfirmation();
        $replacements = $this->askForReplacements($child);

        if (! $child) {
            $preset = $this->askForPreset();
        }

        if ($this->askForConfirmation()) {
            if (isset($preset) && $preset !== 'none') {
                $scaffolder->build($preset);
            }

            $renamer->replace($replacements);

            $this->climate->backgroundLightGreen('Done. Cheers!');
        } else {
            $this->climate->backgroundRed('Shaking abored.');
        }
    }
public function run ( Renamer $ renamer , Scaffolder $ scaffolder ) { $ this -> drawBanner ( ) ; $ child = $ this -> askForChildConfirmation ( ) ; $ replacements = $ this -> askForReplacements ( $ child ) ; if ( ! $ child ) { $ preset = $ this -> askForPreset ( ) ; } if ( $ this -> askForConfirmation ( ) ) { if ( isset ( $ preset ) && $ preset !== 'none' ) { $ scaffolder -> build ( $ preset ) ; } $ renamer -> replace ( $ replacements ) ; $ this -> climate -> backgroundLightGreen ( 'Done. Cheers!' ) ; } else { $ this -> climate -> backgroundRed ( 'Shaking abored.' ) ; } }
Run CLI logic.

@param \Tonik\CLI\Command\Shake $shake

@return void
Run CLI logic .