@@ -19,11 +19,11 @@ |
||
19 | 19 | |
20 | 20 | foreach (Console::getStyles()[ 'options' ] as $option => $value){ |
21 | 21 | Console::log(' ' . |
22 | - Console::tableRow([ |
|
23 | - $index => 7, |
|
24 | - $option => 15, |
|
25 | - "\\033[" . $value .'m' => 15, |
|
26 | - Console::text(str_pad('I am a text style={' . $option .'}', 48), $option) => 50 |
|
22 | + Console::tableRow([ |
|
23 | + $index => 7, |
|
24 | + $option => 15, |
|
25 | + "\\033[" . $value .'m' => 15, |
|
26 | + Console::text(str_pad('I am a text style={' . $option .'}', 48), $option) => 50 |
|
27 | 27 | ])); |
28 | 28 | Console::log(' '.Console::tableRowEmpty($rowHeaders)); // add blank row between element |
29 | 29 | $index++; |
@@ -14,9 +14,9 @@ |
||
14 | 14 | |
15 | 15 | foreach (Console::getStyles()['foregrounds'] as $color => $colorValue ){ |
16 | 16 | Console::log(' '.Console::tableRow([ |
17 | - ' ' . $i => 7, |
|
17 | + ' ' . $i => 7, |
|
18 | 18 | $color => 15, |
19 | - "\\033[" . $colorValue .'m' => 15, |
|
19 | + "\\033[" . $colorValue .'m' => 15, |
|
20 | 20 | Console::text(str_pad('I am a text color={' . $color .'}', 48), $color) => 50 |
21 | 21 | ])); |
22 | 22 | $i++; |
@@ -13,9 +13,9 @@ |
||
13 | 13 | foreach (Console::getStyles()['backgrounds'] as $bgcolor => $colorValue ){ |
14 | 14 | $foregroundColor = $bgcolor === 'black' ? 'white': 'black'; |
15 | 15 | Console::log(' '.Console::tableRow([ |
16 | - ' ' . $i => 7, |
|
16 | + ' ' . $i => 7, |
|
17 | 17 | $bgcolor => 15, |
18 | - "\\033[" . $colorValue .'m' => 15, |
|
18 | + "\\033[" . $colorValue .'m' => 15, |
|
19 | 19 | Console::text(str_pad('I am a text color={' . $foregroundColor .'} on bgcolor={' . $bgcolor .'}', 48), $foregroundColor , $bgcolor) => 50 |
20 | 20 | ])); |
21 | 21 | $i++; |
@@ -16,13 +16,13 @@ discard block |
||
16 | 16 | |
17 | 17 | |
18 | 18 | $headerStyles = [' ' => 31, |
19 | - 'none' => 6, |
|
20 | - 'bold' => 6, |
|
21 | - 'underline' => 12, |
|
22 | - 'blink' => 7, |
|
23 | - 'reverse' => 10, |
|
24 | - ' ' => 50 |
|
25 | - ]; |
|
19 | + 'none' => 6, |
|
20 | + 'bold' => 6, |
|
21 | + 'underline' => 12, |
|
22 | + 'blink' => 7, |
|
23 | + 'reverse' => 10, |
|
24 | + ' ' => 50 |
|
25 | + ]; |
|
26 | 26 | |
27 | 27 | Console::log(' '.Console::tableRowSeparator($rowHeaders1)); |
28 | 28 | Console::log(' '.Console::tableRow($rowHeaders1)); |
@@ -37,13 +37,13 @@ discard block |
||
37 | 37 | |
38 | 38 | foreach (Console::getStyles()['backgrounds'] as $color => $colorValue ){ |
39 | 39 | Console::log(' '.Console::tableRow([ |
40 | - ' ' . $i => 7, |
|
40 | + ' ' . $i => 7, |
|
41 | 41 | $color => 15, |
42 | - "\\033[" . $colorValue .'m' => 15, |
|
42 | + "\\033[" . $colorValue .'m' => 15, |
|
43 | 43 | Console::text(str_pad('I am a text color={normal} bgcolor={' . $color .'}', 48), 'normal', $color) => 50 |
44 | 44 | ])); |
45 | 45 | Console::log(' '.Console::tableEmptyRow(); |
46 | - $i++; |
|
46 | + $i++; |
|
47 | 47 | } |
48 | 48 | Console::log(' '.Console::tableRowEmpty($rowHeaders1)); |
49 | 49 | Console::log(' '.Console::tableRowSeparator($rowHeaders1)); |
@@ -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 | /** |
@@ -98,7 +98,7 @@ discard block |
||
98 | 98 | */ |
99 | 99 | public static $verticalSeparator = '|'; |
100 | 100 | |
101 | - /** |
|
101 | + /** |
|
102 | 102 | * The vertical separator sign. |
103 | 103 | * |
104 | 104 | * @access public |
@@ -148,17 +148,17 @@ discard block |
||
148 | 148 | return self::getCliString(self::$verticalInnerSeparator === '' ? $str : substr($str, 0, strlen($str) -1). self::$verticalSeparator, $args); |
149 | 149 | } |
150 | 150 | |
151 | - /** |
|
152 | - * Gets a formated table row separator |
|
153 | - * |
|
154 | - * @access public |
|
155 | - * @static method |
|
156 | - * @param string [$color] The text color for the wall row |
|
157 | - * @param string [$bgcolor] The back color for the wall row |
|
158 | - * @param string [$option]+... The text styles for the wall row |
|
159 | - * |
|
160 | - * @return string |
|
161 | - */ |
|
151 | + /** |
|
152 | + * Gets a formated table row separator |
|
153 | + * |
|
154 | + * @access public |
|
155 | + * @static method |
|
156 | + * @param string [$color] The text color for the wall row |
|
157 | + * @param string [$bgcolor] The back color for the wall row |
|
158 | + * @param string [$option]+... The text styles for the wall row |
|
159 | + * |
|
160 | + * @return string |
|
161 | + */ |
|
162 | 162 | public static function tableSeparator() |
163 | 163 | { |
164 | 164 | $args = func_get_args(); |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * |
248 | 248 | * @return string |
249 | 249 | */ |
250 | - public static function tableRow() |
|
250 | + public static function tableRow() |
|
251 | 251 | { |
252 | 252 | // get and parse arguments: |
253 | 253 | // - extract first argument (columns list) |
@@ -127,7 +127,7 @@ discard block |
||
127 | 127 | $i = 0; |
128 | 128 | foreach (getIndex() as $key => $value){ |
129 | 129 | |
130 | - if (file_exists( __DIR__ . '/'. $value[2])) { |
|
130 | + if (file_exists( __DIR__ . '/'. $value[2])) { |
|
131 | 131 | Console::log(' '. |
132 | 132 | Console::tableRow([ |
133 | 133 | $key => 10, |
@@ -136,9 +136,9 @@ discard block |
||
136 | 136 | ], |
137 | 137 | 'white', 'black' |
138 | 138 | |
139 | - // ($i % 2 == 1) ? 'white' : 'white', |
|
140 | - // ($i % 2 == 1) ? 'cyan' : 'lightgrey', |
|
141 | - // ($i % 2 == 1) ? '' : 'bold' |
|
139 | + // ($i % 2 == 1) ? 'white' : 'white', |
|
140 | + // ($i % 2 == 1) ? 'cyan' : 'lightgrey', |
|
141 | + // ($i % 2 == 1) ? '' : 'bold' |
|
142 | 142 | ) |
143 | 143 | ); |
144 | 144 | $i++; |
@@ -183,23 +183,23 @@ discard block |
||
183 | 183 | printSampleHeader($selectedIndex, $title); |
184 | 184 | |
185 | 185 | Console::log($base . Console::text('Start running [', 'white') . |
186 | - Console::text( $title, 'lightcyan') . |
|
187 | - Console::text('] in file [', 'white') . |
|
188 | - Console::text( $fileName, 'lightcyan') . |
|
189 | - Console::text(']', 'white')); |
|
186 | + Console::text( $title, 'lightcyan') . |
|
187 | + Console::text('] in file [', 'white') . |
|
188 | + Console::text( $fileName, 'lightcyan') . |
|
189 | + Console::text(']', 'white')); |
|
190 | 190 | |
191 | 191 | if (file_exists($filePath)){ |
192 | 192 | Console::log(); |
193 | 193 | include $filePath; |
194 | 194 | Console::log(); |
195 | 195 | Console::log($base . Console::text('End running [', 'white') . |
196 | - Console::text( $title, 'lightcyan') . |
|
197 | - Console::text(']', 'white')); |
|
196 | + Console::text( $title, 'lightcyan') . |
|
197 | + Console::text(']', 'white')); |
|
198 | 198 | $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')); |
199 | - if (strtoupper($response) === 'Y') { |
|
199 | + if (strtoupper($response) === 'Y') { |
|
200 | 200 | Console::log($base . Console::text('The code in file [', 'white') . |
201 | - Console::text( $fileName, 'lightcyan') . |
|
202 | - Console::text('] is:', 'white')); |
|
201 | + Console::text( $fileName, 'lightcyan') . |
|
202 | + Console::text('] is:', 'white')); |
|
203 | 203 | Console::log(); |
204 | 204 | |
205 | 205 | $lines = file($filePath, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); |
@@ -215,10 +215,10 @@ discard block |
||
215 | 215 | } |
216 | 216 | Console::log(); |
217 | 217 | } |
218 | - } else { |
|
218 | + } else { |
|
219 | 219 | Console::log($base . Console::text('Error' , 'red')); |
220 | 220 | Console::log($base . Console::text(' => File missing [' . $fileName . ']' , 'red')); |
221 | - } |
|
221 | + } |
|
222 | 222 | |
223 | 223 | } else { |
224 | 224 | Console::log($base . Console::text('Error:', 'red')); |