@@ -13,7 +13,7 @@ |
||
| 13 | 13 | $foregroundColor = ($bgcolor === 'black' || $bgcolor === 'default') ? 'white': 'black'; |
| 14 | 14 | Console::log(' '.Console::tableRow([ |
| 15 | 15 | $bgcolor => 15, |
| 16 | - "\\033[" . $colorValue .'m' => 15, |
|
| 16 | + "\\033[" . $colorValue .'m' => 15, |
|
| 17 | 17 | Console::text(str_pad('I am a text color={' . $foregroundColor .'} on bgcolor={' . $bgcolor .'}', 48), $foregroundColor , $bgcolor) => 51 |
| 18 | 18 | ])); |
| 19 | 19 | $i++; |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | Console::log(' '. Console::text('Tips:', 'underlined', 'bold')); |
| 10 | 10 | Console::log(" - You can customize colors (foreground and background) and some styles in same way than "); |
| 11 | 11 | Console::log(' with ' . Console::text("Console::text()", 'lightblue', 'underlined') . |
| 12 | - ' and ' . Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.'); |
|
| 12 | + ' and ' . Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.'); |
|
| 13 | 13 | Console::log(); |
| 14 | 14 | Console::log(' '. Console::text('Usage:', 'underlined', 'bold')); |
| 15 | 15 | Console::log(' '. Console::text("\$value = Console::ask('Please enter something > ');", 'lightmagenta')); |
@@ -8,7 +8,7 @@ |
||
| 8 | 8 | Console::log(' '. Console::text('Tips:', 'underlined', 'bold')); |
| 9 | 9 | Console::log(" - You can customize colors (foreground and background) and some styles in same way than "); |
| 10 | 10 | Console::log(' with ' . Console::text("Console::text()", 'lightblue', 'underlined') . |
| 11 | - ' and ' . Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.'); |
|
| 11 | + ' and ' . Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.'); |
|
| 12 | 12 | Console::log(); |
| 13 | 13 | Console::log(' '. Console::text('Warning:', 'underlined', 'bold')); |
| 14 | 14 | Console::log(' '. Console::text("User input are not hidden on windows platform (not supported)", 'red', 'yellow')); |
@@ -9,7 +9,7 @@ |
||
| 9 | 9 | Console::log(" - The method returns " . Console::text("int", 'blue') . " value or " . Console::text("false", 'blue'). " if the entered value is not a valid int number."); |
| 10 | 10 | Console::log(" - You can customize colors (foreground and background) and some styles in same way than "); |
| 11 | 11 | Console::log(' with ' . Console::text("Console::text()", 'lightblue', 'underlined') . |
| 12 | - ' and ' . Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.'); |
|
| 12 | + ' and ' . Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.'); |
|
| 13 | 13 | Console::log(); |
| 14 | 14 | Console::log(' '. Console::text('Usage:', 'underlined', 'bold')); |
| 15 | 15 | Console::log(' ' . Console::text("\$value = Console::askInt('Please enter a number > ');", 'lightmagenta')); |
@@ -12,9 +12,9 @@ |
||
| 12 | 12 | $i = 1; |
| 13 | 13 | foreach (Console::getStyles()['foregrounds'] as $color => $colorValue ){ |
| 14 | 14 | Console::log(' '.Console::tableRow([ |
| 15 | - ' ' . $i => 7, |
|
| 15 | + ' ' . $i => 7, |
|
| 16 | 16 | $color => 15, |
| 17 | - "\\033[" . $colorValue .'m' => 15, |
|
| 17 | + "\\033[" . $colorValue .'m' => 15, |
|
| 18 | 18 | Console::text(str_pad('I am a text color={' . $color .'}', 48), $color) => 50 |
| 19 | 19 | ])); |
| 20 | 20 | $i++; |
@@ -109,7 +109,7 @@ |
||
| 109 | 109 | Console::$horizontalSeparator = '-'; // change the horizontal separator |
| 110 | 110 | Console::$tableCellPadding = ''; // no padding |
| 111 | 111 | Console::$verticalInnerSeparator = ' '; // blank separator |
| 112 | - Console::$verticalSeparator = ' '; // no top left/right separator except a margin.. |
|
| 112 | + Console::$verticalSeparator = ' '; // no top left/right separator except a margin.. |
|
| 113 | 113 | // Console::$verticalHeaderSeparator = ''; // no top left/right separator (not needed) |
| 114 | 114 | |
| 115 | 115 | // table start |
@@ -58,12 +58,12 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | protected static $defaultVerticalSign = '|'; |
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * The default vertical sign. |
|
| 63 | - * |
|
| 64 | - * @access protected |
|
| 65 | - * @var string |
|
| 66 | - */ |
|
| 61 | + /** |
|
| 62 | + * The default vertical sign. |
|
| 63 | + * |
|
| 64 | + * @access protected |
|
| 65 | + * @var string |
|
| 66 | + */ |
|
| 67 | 67 | protected static $defaultVerticalInnerSign = '+'; |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | public static $verticalHeaderSeparator = '+'; |
| 108 | 108 | |
| 109 | - /** |
|
| 109 | + /** |
|
| 110 | 110 | * The vertical separator sign. |
| 111 | 111 | * |
| 112 | 112 | * @access public |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | * |
| 258 | 258 | * @return string |
| 259 | 259 | */ |
| 260 | - public static function tableRow() |
|
| 260 | + public static function tableRow() |
|
| 261 | 261 | { |
| 262 | 262 | // get and parse arguments: |
| 263 | 263 | // - extract first argument (columns list) |
@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | */ |
| 48 | 48 | public static function inArguments(array $arguments, string $shortArg, string $longArg) |
| 49 | 49 | { |
| 50 | - return array_key_exists($shortArg, $arguments) || array_key_exists($longArg, $arguments); |
|
| 50 | + return array_key_exists($shortArg, $arguments) || array_key_exists($longArg, $arguments); |
|
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | /** |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | */ |
| 66 | 66 | public static function getArgumentValue(array $arguments, string $shortArg, string $longArg):? string |
| 67 | 67 | { |
| 68 | - return array_key_exists($shortArg, $arguments) ? $arguments[$shortArg] : |
|
| 68 | + return array_key_exists($shortArg, $arguments) ? $arguments[$shortArg] : |
|
| 69 | 69 | (array_key_exists($longArg, $arguments) ? $arguments[$longArg] : null); |
| 70 | 70 | } |
| 71 | 71 | |
@@ -58,12 +58,12 @@ discard block |
||
| 58 | 58 | */ |
| 59 | 59 | protected static $defaultVerticalSign = '|'; |
| 60 | 60 | |
| 61 | - /** |
|
| 62 | - * The default vertical sign. |
|
| 63 | - * |
|
| 64 | - * @access protected |
|
| 65 | - * @var string |
|
| 66 | - */ |
|
| 61 | + /** |
|
| 62 | + * The default vertical sign. |
|
| 63 | + * |
|
| 64 | + * @access protected |
|
| 65 | + * @var string |
|
| 66 | + */ |
|
| 67 | 67 | protected static $defaultVerticalInnerSign = '+'; |
| 68 | 68 | |
| 69 | 69 | /** |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | */ |
| 107 | 107 | public static $verticalHeaderSeparator = '+'; |
| 108 | 108 | |
| 109 | - /** |
|
| 109 | + /** |
|
| 110 | 110 | * The vertical separator sign. |
| 111 | 111 | * |
| 112 | 112 | * @access public |
@@ -257,7 +257,7 @@ discard block |
||
| 257 | 257 | * |
| 258 | 258 | * @return string |
| 259 | 259 | */ |
| 260 | - public static function tableRow() |
|
| 260 | + public static function tableRow() |
|
| 261 | 261 | { |
| 262 | 262 | // get and parse arguments: |
| 263 | 263 | // - extract first argument (columns list) |