Skip to content

Commit

Permalink
Clean up usage of _stop() and error().
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Dec 21, 2015
1 parent a32e327 commit 4fba5e9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Console/Shell.php
Expand Up @@ -670,7 +670,7 @@ public function hr($newlines = 0, $width = 63)
*
* @param string $title Title of the error
* @param string|null $message An optional error message
* @return void
* @return int Error code
* @link http://book.cakephp.org/3.0/en/console-and-shells.html#styling-output
*/
public function error($title, $message = null)
Expand All @@ -681,6 +681,8 @@ public function error($title, $message = null)
$this->_io->err($message);
}
$this->_stop(1);

return 1;
}

/**
Expand Down Expand Up @@ -720,7 +722,8 @@ public function createFile($path, $contents)

if (strtolower($key) === 'q') {
$this->_io->out('<error>Quitting</error>.', 2);
return $this->_stop();
$this->_stop();
return false;
}
if (strtolower($key) === 'a') {
$this->params['force'] = true;
Expand Down

0 comments on commit 4fba5e9

Please sign in to comment.