Passed
Push — master ( ee34bd...e5d01b )
by Kris
02:48 queued 01:15
created
lib/Program.php 1 patch
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
      */
48 48
     protected 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,11 +65,11 @@  discard block
 block discarded – undo
65 65
      */
66 66
     protected static function getArgumentValue(array $arguments, string $shortArg, string $longArg)
67 67
     {
68
-          $val = array_key_exists($shortArg, $arguments) ? $arguments[$shortArg] : 
68
+            $val = array_key_exists($shortArg, $arguments) ? $arguments[$shortArg] : 
69 69
                  (array_key_exists($longArg, $arguments) ? $arguments[$longArg]  : null);
70 70
           
71 71
           
72
-          return $val;
72
+            return $val;
73 73
 
74 74
     }
75 75
 
Please login to merge, or discard this patch.
demo/demo.progress.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
demo/demo.bgcolors.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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++;
Please login to merge, or discard this patch.
demo/index.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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'));
Please login to merge, or discard this patch.
demo/demo.ask.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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'));
Please login to merge, or discard this patch.
demo/demo.askpassword.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@
 block discarded – undo
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'));
Please login to merge, or discard this patch.
demo/demo.askint.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -9,7 +9,7 @@
 block discarded – undo
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')); 
Please login to merge, or discard this patch.
demo/demo.colors.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,9 +12,9 @@
 block discarded – undo
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++;
Please login to merge, or discard this patch.
lib/ShellTablePrinter.php 1 patch
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
106 106
      */
107 107
     public static $verticalHeaderSeparator   = '+';
108 108
 
109
-   /**
109
+    /**
110 110
      * The vertical separator sign. 
111 111
      *
112 112
      * @access public
@@ -157,17 +157,17 @@  discard block
 block discarded – undo
157 157
         return self::getCliString(self::$verticalInnerSeparator === '' ? $str : substr($str, 0, mb_strlen($str) -1). self::$verticalSeparator, $args);
158 158
     }
159 159
 
160
-     /**
161
-     * Gets a formated table row separator
162
-     *
163
-     * @access public
164
-     * @static method
165
-     * @param  string   [$color]        The text color for the wall row
166
-     * @param  string   [$bgcolor]      The back color for the wall row
167
-     * @param  string   [$option]+...   The text styles for the wall row
168
-     *
169
-     * @return string         
170
-     */
160
+        /**
161
+         * Gets a formated table row separator
162
+         *
163
+         * @access public
164
+         * @static method
165
+         * @param  string   [$color]        The text color for the wall row
166
+         * @param  string   [$bgcolor]      The back color for the wall row
167
+         * @param  string   [$option]+...   The text styles for the wall row
168
+         *
169
+         * @return string         
170
+         */
171 171
     public static function tableSeparator()
172 172
     {
173 173
         $args = func_get_args();
@@ -257,7 +257,7 @@  discard block
 block discarded – undo
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)
Please login to merge, or discard this patch.