Skip to content

Commit dbd3078

Browse files
committed
Rename Color's variable to just as we do camelcase here
1 parent d7dd0ec commit dbd3078

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ Ahc\Cli\Output\Color::style('error', [
511511
#### Disable colors
512512

513513
```php
514-
Ahc\Cli\Output\Color::$colors_enabled = false;
514+
Ahc\Cli\Output\Color::$enabled = false;
515515
```
516516

517517
### Cursor

src/Output/Color.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ class Color
5050
const GRAY = 47;
5151
const DARKGRAY = 100;
5252

53-
public static bool $colors_enabled = true;
53+
public static bool $enabled = true;
5454

5555
protected string $format = "\033[:mod:;:fg:;:bg:m:txt:\033[0m";
5656

@@ -140,7 +140,7 @@ public static function fg256(int $code): string
140140
*/
141141
public function line(string $text, array $style = []): string
142142
{
143-
if (!self::$colors_enabled) {
143+
if (!self::$enabled) {
144144
return $text;
145145
}
146146

@@ -235,7 +235,7 @@ public function __call(string $name, array $arguments): string
235235
}
236236

237237
if (!method_exists($this, $name)) {
238-
if (!self::$colors_enabled) {
238+
if (!self::$enabled) {
239239
return $text;
240240
}
241241

0 commit comments

Comments
 (0)