Skip to content

Commit

Permalink
move from ConsoleIo:: and Shell:: constants to self:: constants
Browse files Browse the repository at this point in the history
  • Loading branch information
inoas committed Aug 7, 2018
1 parent abbb678 commit 875ab1b
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions src/Console/ConsoleIo.php
Expand Up @@ -84,7 +84,7 @@ class ConsoleIo
*
* @var int
*/
protected $_level = ConsoleIo::NORMAL;
protected $_level = self::NORMAL;

/**
* The number of bytes last written to the output stream
Expand Down Expand Up @@ -163,17 +163,17 @@ public function quiet($message, $newlines = 1)
*
* ### Output levels
*
* There are 3 built-in output level. Shell::QUIET, Shell::NORMAL, Shell::VERBOSE.
* There are 3 built-in output level. self::QUIET, self::NORMAL, self::VERBOSE.
* The verbose and quiet output levels, map to the `verbose` and `quiet` output switches
* present in most shells. Using Shell::QUIET for a message means it will always display.
* While using Shell::VERBOSE means it will only display when verbose output is toggled.
* present in most shells. Using self::QUIET for a message means it will always display.
* While using self::VERBOSE means it will only display when verbose output is toggled.
*
* @param string|array $message A string or an array of strings to output
* @param int $newlines Number of newlines to append
* @param int $level The message's output level, see above.
* @return int|bool The number of bytes returned from writing to stdout.
*/
public function out($message = '', $newlines = 1, $level = ConsoleIo::NORMAL)
public function out($message = '', $newlines = 1, $level = self::NORMAL)
{
if ($level <= $this->_level) {
$this->_lastWritten = (int)$this->_out->write($message, $newlines);
Expand All @@ -191,9 +191,9 @@ public function out($message = '', $newlines = 1, $level = ConsoleIo::NORMAL)
* @param int $newlines Number of newlines to append
* @param int $level The message's output level, see above.
* @return int|bool The number of bytes returned from writing to stdout.
* @see https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::out
* @see https://book.cakephp.org/3.0/en/console-and-shells.html#ConsoleIo::out
*/
public function info($message = null, $newlines = 1, $level = Shell::NORMAL)
public function info($message = null, $newlines = 1, $level = self::NORMAL)
{
$messageType = 'info';
$message = $this->wrapMessageWithType($messageType, $message);
Expand All @@ -207,7 +207,7 @@ public function info($message = null, $newlines = 1, $level = Shell::NORMAL)
* @param string|array|null $message A string or an array of strings to output
* @param int $newlines Number of newlines to append
* @return int|bool The number of bytes returned from writing to stderr.
* @see https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::err
* @see https://book.cakephp.org/3.0/en/console-and-shells.html#ConsoleIo::err
*/
public function warning($message = null, $newlines = 1)
{
Expand All @@ -223,7 +223,7 @@ public function warning($message = null, $newlines = 1)
* @param string|array|null $message A string or an array of strings to output
* @param int $newlines Number of newlines to append
* @return int|bool The number of bytes returned from writing to stderr.
* @see https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::err
* @see https://book.cakephp.org/3.0/en/console-and-shells.html#ConsoleIo::err
*/
public function error($message = null, $newlines = 1)
{
Expand All @@ -240,9 +240,9 @@ public function error($message = null, $newlines = 1)
* @param int $newlines Number of newlines to append
* @param int $level The message's output level, see above.
* @return int|bool The number of bytes returned from writing to stdout.
* @see https://book.cakephp.org/3.0/en/console-and-shells.html#Shell::out
* @see https://book.cakephp.org/3.0/en/console-and-shells.html#ConsoleIo::out
*/
public function success($message = null, $newlines = 1, $level = Shell::NORMAL)
public function success($message = null, $newlines = 1, $level = self::NORMAL)
{
$messageType = 'success';
$message = $this->wrapMessageWithType($messageType, $message);
Expand Down

0 comments on commit 875ab1b

Please sign in to comment.