Skip to content

Commit

Permalink
Rename BRIGHT and DIM modes
Browse files Browse the repository at this point in the history
  • Loading branch information
BenMorel committed Aug 13, 2018
1 parent bb86d67 commit c790b37
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions src/Console.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ class Console
/**
* The available text modes.
*/
public const MODE_DEFAULT = 0;
public const MODE_BRIGHT = 1;
public const MODE_DIM = 2;
public const MODE_ITALIC = 3;
public const MODE_UNDERSCORE = 4;
public const MODE_BLINK = 5;
public const MODE_REVERSE = 7;
public const MODE_HIDDEN = 8;
public const MODE_DEFAULT = 0;
public const MODE_BOLD = 1;
public const MODE_HALF_BRIGHT = 2;
public const MODE_ITALIC = 3;
public const MODE_UNDERSCORE = 4;
public const MODE_BLINK = 5;
public const MODE_REVERSE = 7;
public const MODE_HIDDEN = 8;

/**
* The available text/background colors.
Expand Down
4 changes: 2 additions & 2 deletions src/Pen.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class Pen
*/
public function bold() : Pen
{
$this->attributes[] = Console::MODE_BRIGHT;
$this->attributes[] = Console::MODE_BOLD;

return $this;
}
Expand All @@ -28,7 +28,7 @@ public function bold() : Pen
*/
public function halfBright() : Pen
{
$this->attributes[] = Console::MODE_DIM;
$this->attributes[] = Console::MODE_HALF_BRIGHT;

return $this;
}
Expand Down
4 changes: 2 additions & 2 deletions tests.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@
$console->setTextMode(Console::MODE_DEFAULT);
$console->println('Back to default');

$console->setTextMode(Console::MODE_BRIGHT);
$console->setTextMode(Console::MODE_BOLD);
$console->println('Bright');
$console->setTextMode(Console::MODE_DEFAULT);

$console->setTextMode(Console::MODE_DIM);
$console->setTextMode(Console::MODE_HALF_BRIGHT);
$console->println('Dim');
$console->setTextMode(Console::MODE_DEFAULT);

Expand Down

0 comments on commit c790b37

Please sign in to comment.