@@ -10,7 +10,7 @@ |
||
10 | 10 | Console::log(" - you may need to use " . Console::text("php str_pad()", 'lightblue', 'underlined') . " method to be sure all previous text is overwitted."); |
11 | 11 | Console::log(" - You can customize colors (foreground and background) and some styles in same way than "); |
12 | 12 | Console::log(' with ' . Console::text("Console::text()", 'lightblue', 'underlined') . |
13 | - ' and ' . Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.'); |
|
13 | + ' and ' . Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.'); |
|
14 | 14 | Console::log(); |
15 | 15 | Console::log(' '. Console::text('Sample code:', 'underlined', 'bold')); |
16 | 16 | Console::log(); |
@@ -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++; |
@@ -116,7 +116,7 @@ discard block |
||
116 | 116 | Console::log(); |
117 | 117 | |
118 | 118 | foreach (getIndex() as $key => $value){ |
119 | - if (file_exists( __DIR__ . '/'. $value[2])) { |
|
119 | + if (file_exists( __DIR__ . '/'. $value[2])) { |
|
120 | 120 | Console::log(''. |
121 | 121 | Console::TableRowStart(). |
122 | 122 | Console::TableRowCell(Console::text($key,'lightgray'), 6, Console::ALIGN_CENTER). //no align => default is left |
@@ -162,24 +162,24 @@ discard block |
||
162 | 162 | printSampleHeader($selectedIndex, $title); |
163 | 163 | |
164 | 164 | Console::log($base . Console::text('Start running [', 'white') . |
165 | - Console::text( $title, 'lightcyan') . |
|
166 | - Console::text('] in file [', 'white') . |
|
167 | - Console::text( $fileName, 'lightcyan') . |
|
168 | - Console::text(']', 'white')); |
|
165 | + Console::text( $title, 'lightcyan') . |
|
166 | + Console::text('] in file [', 'white') . |
|
167 | + Console::text( $fileName, 'lightcyan') . |
|
168 | + Console::text(']', 'white')); |
|
169 | 169 | |
170 | 170 | if (file_exists($filePath)){ |
171 | 171 | Console::log(); |
172 | 172 | include $filePath; |
173 | 173 | Console::log(); |
174 | 174 | Console::log($base . Console::text('End running [', 'white') . |
175 | - Console::text( $title, 'lightcyan') . |
|
176 | - Console::text(']', 'white')); |
|
175 | + Console::text( $title, 'lightcyan') . |
|
176 | + Console::text(']', 'white')); |
|
177 | 177 | |
178 | - $response = Console::ask($base . Console::text('Do you want to see the code that has been executed? (type y/Y to see the code) > ', 'white')); |
|
179 | - if (strtoupper($response) === 'Y') { |
|
178 | + $response = Console::ask($base . Console::text('Do you want to see the code that has been executed? (type y/Y to see the code) > ', 'white')); |
|
179 | + if (strtoupper($response) === 'Y') { |
|
180 | 180 | Console::log($base . Console::text('The code in file [', 'white') . |
181 | - Console::text( $fileName, 'lightcyan') . |
|
182 | - Console::text('] is:', 'white')); |
|
181 | + Console::text( $fileName, 'lightcyan') . |
|
182 | + Console::text('] is:', 'white')); |
|
183 | 183 | Console::log(); |
184 | 184 | |
185 | 185 | $lines = file($filePath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); |
@@ -197,10 +197,10 @@ discard block |
||
197 | 197 | Console::log(Console::pad(' ', 100, '-'), 'darkgray'); |
198 | 198 | Console::log(); |
199 | 199 | } |
200 | - } else { |
|
200 | + } else { |
|
201 | 201 | Console::log($base . Console::text('Error' , 'red')); |
202 | 202 | Console::log($base . Console::text(' => File missing [' . $fileName . ']' , 'red')); |
203 | - } |
|
203 | + } |
|
204 | 204 | |
205 | 205 | } else { |
206 | 206 | Console::log($base . Console::text('Error:', 'red')); |
@@ -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) |