Passed
Pull Request — master (#13)
by Kris
19:43
created
demo/demo.styles.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,21 +1,21 @@
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ .'/../vendor/autoload.php';
2
+require_once __DIR__.'/../vendor/autoload.php';
3 3
 use Kristuff\Mishell\Console;
4 4
 
5 5
 // the row header
6
-$rowHeaders = [ 'Style name' => 15, 'ANSI Code' => 15, 'Sample ouput' => 50 ];
6
+$rowHeaders = ['Style name' => 15, 'ANSI Code' => 15, 'Sample ouput' => 50];
7 7
 Console::log('  '.Console::tableRowSeparator($rowHeaders));
8 8
 Console::log('  '.Console::tableRow($rowHeaders));
9 9
 Console::log('  '.Console::tableRowSeparator($rowHeaders));
10 10
 
11 11
 // enum styles
12 12
 $index = 1;
13
-foreach (Console::getStyles()[ 'options' ] as $option => $value){
14
-    Console::log('  ' .
13
+foreach (Console::getStyles()['options'] as $option => $value) {
14
+    Console::log('  '.
15 15
         Console::tableRow([
16 16
             $option   => 15, 
17
-            "\\033[" . $value  .'m'  => 15, 
18
-            Console::text('I am a text style={' . $option .'}', $option) => 50
17
+            "\\033[".$value.'m'  => 15, 
18
+            Console::text('I am a text style={'.$option.'}', $option) => 50
19 19
         ]));
20 20
     $index++; 
21 21
 }
Please login to merge, or discard this patch.
demo/demo.askpassword.php 2 patches
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.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,30 +1,30 @@
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ .'/../vendor/autoload.php';
2
+require_once __DIR__.'/../vendor/autoload.php';
3 3
 use Kristuff\Mishell\Console;
4 4
 
5
-Console::log(' '. Console::text('Overview:', 'underlined', 'bold'));
6
-Console::log('  Use ' .   Console::text("string ", 'blue'). Console::text("Console::askPassword()", 'lightblue', 'underlined') . " to ask user to enter a value and return this value.", 'white');
5
+Console::log(' '.Console::text('Overview:', 'underlined', 'bold'));
6
+Console::log('  Use '.Console::text("string ", 'blue').Console::text("Console::askPassword()", 'lightblue', 'underlined')." to ask user to enter a value and return this value.", 'white');
7 7
 Console::log();
8
-Console::log(' '. Console::text('Tips:', 'underlined', 'bold'));
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
-Console::log('     with ' . Console::text("Console::text()", 'lightblue', 'underlined') . 
11
-                 ' and ' .  Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.');
10
+Console::log('     with '.Console::text("Console::text()", 'lightblue', 'underlined'). 
11
+                 ' and '.Console::text("Console::log()", 'lightblue', 'underlined').' methods.');
12 12
 Console::log();
13
-Console::log(' '. Console::text('Warning:', 'underlined', 'bold'));
14
-Console::log('    '. Console::text("User input are not hidden on windows platform (not supported)", 'red', 'yellow'));
13
+Console::log(' '.Console::text('Warning:', 'underlined', 'bold'));
14
+Console::log('    '.Console::text("User input are not hidden on windows platform (not supported)", 'red', 'yellow'));
15 15
 Console::log();
16
-Console::log(' '. Console::text('Usage:', 'underlined', 'bold'));
17
-Console::log('   ' . Console::text("\$value = Console::askPassword('Please Enter something (We wont display it, for now...)  > ');", 'lightmagenta')); 
18
-Console::log('   ' . Console::text("Console::log();", 'lightmagenta')); 
19
-Console::log('   ' . Console::text("Console::log('=> the value you entered is [' . Console::text(\$value, 'red') . ']');", 'lightmagenta')); 
16
+Console::log(' '.Console::text('Usage:', 'underlined', 'bold'));
17
+Console::log('   '.Console::text("\$value = Console::askPassword('Please Enter something (We wont display it, for now...)  > ');", 'lightmagenta')); 
18
+Console::log('   '.Console::text("Console::log();", 'lightmagenta')); 
19
+Console::log('   '.Console::text("Console::log('=> the value you entered is [' . Console::text(\$value, 'red') . ']');", 'lightmagenta')); 
20 20
 Console::log();
21
-Console::log(' '. Console::text('Sample:', 'underlined', 'bold'));
21
+Console::log(' '.Console::text('Sample:', 'underlined', 'bold'));
22 22
 
23 23
 // -----------------
24 24
 // sample start here
25 25
 // -----------------
26 26
 $value = Console::askPassword(' Please Enter something (We wont display it, for now... (except on windows)  > ');
27 27
 Console::log();
28
-Console::log(' => the value you entered is [' . Console::text($value, 'red') . ']');
28
+Console::log(' => the value you entered is ['.Console::text($value, 'red').']');
29 29
 
30 30
 ?>
31 31
\ No newline at end of file
Please login to merge, or discard this patch.
demo/demo.askint.php 2 patches
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.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -1,29 +1,29 @@
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ .'/../vendor/autoload.php';
2
+require_once __DIR__.'/../vendor/autoload.php';
3 3
 use Kristuff\Mishell\Console;
4 4
 
5
-Console::log(' '. Console::text('Overview:', 'underlined', 'bold'));
6
-Console::log("  - Use " . Console::text("int|bool ", 'blue') . Console::text("Console::askInt()", 'lightblue', 'underlined') . " to ask user to enter a number in the console.");
5
+Console::log(' '.Console::text('Overview:', 'underlined', 'bold'));
6
+Console::log("  - Use ".Console::text("int|bool ", 'blue').Console::text("Console::askInt()", 'lightblue', 'underlined')." to ask user to enter a number in the console.");
7 7
 Console::log();
8
-Console::log(' '. Console::text('Tips:', 'underlined', 'bold'));
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.");
8
+Console::log(' '.Console::text('Tips:', 'underlined', 'bold'));
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
-Console::log('     with ' . Console::text("Console::text()", 'lightblue', 'underlined') . 
12
-                 ' and ' .  Console::text("Console::log()", 'lightblue', 'underlined'). ' methods.');
11
+Console::log('     with '.Console::text("Console::text()", 'lightblue', 'underlined'). 
12
+                 ' and '.Console::text("Console::log()", 'lightblue', 'underlined').' methods.');
13 13
 Console::log();
14
-Console::log(' '. Console::text('Usage:', 'underlined', 'bold'));
15
-Console::log('   ' . Console::text("\$value = Console::askInt('Please enter a number > ');", 'lightmagenta')); 
16
-Console::log('   ' . Console::text("if (\$value !== false) {", 'lightmagenta')); 
17
-Console::log('   ' . Console::text("// Do something with \$value", 'green')); 
14
+Console::log(' '.Console::text('Usage:', 'underlined', 'bold'));
15
+Console::log('   '.Console::text("\$value = Console::askInt('Please enter a number > ');", 'lightmagenta')); 
16
+Console::log('   '.Console::text("if (\$value !== false) {", 'lightmagenta')); 
17
+Console::log('   '.Console::text("// Do something with \$value", 'green')); 
18 18
 Console::log();
19
-Console::log(' '. Console::text('Sample:', 'underlined', 'bold'));
19
+Console::log(' '.Console::text('Sample:', 'underlined', 'bold'));
20 20
 
21 21
 // -----------------
22 22
 // sample start here
23 23
 // -----------------
24 24
 $value = Console::askInt('  Please enter a number > ');
25
-if ($value !== false){
26
-    Console::log('  => The value you entered is [' . Console::text($value, 'yellow') . ']');
25
+if ($value !== false) {
26
+    Console::log('  => The value you entered is ['.Console::text($value, 'yellow').']');
27 27
 } else {
28 28
     Console::log(Console::text('  Error:', 'red'));
29 29
     Console::log(Console::text('  => the value you entered is not a valid number.', 'red'));
Please login to merge, or discard this patch.
demo/demo.bell.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ .'/../vendor/autoload.php';
2
+require_once __DIR__.'/../vendor/autoload.php';
3 3
 use Kristuff\Mishell\Console;
4 4
 
5
-Console::log(' '. Console::text('Overview:', 'underlined', 'bold'));
6
-Console::log('  - Use ' . Console::text("Console::bell()", 'lightblue', 'underlined') . ' to play a bell sound in console (if available).', 'white');
5
+Console::log(' '.Console::text('Overview:', 'underlined', 'bold'));
6
+Console::log('  - Use '.Console::text("Console::bell()", 'lightblue', 'underlined').' to play a bell sound in console (if available).', 'white');
7 7
 Console::log();   
8
-Console::log(' '. Console::text('Usage:', 'underlined', 'bold'));
8
+Console::log(' '.Console::text('Usage:', 'underlined', 'bold'));
9 9
 Console::log();   
10
-Console::log('   ' .Console::text('// Play the bell', 'green'));
11
-Console::log('   ' .Console::text('Console::bell();', 'lightmagenta'));
10
+Console::log('   '.Console::text('// Play the bell', 'green'));
11
+Console::log('   '.Console::text('Console::bell();', 'lightmagenta'));
12 12
 Console::log();   
13
-Console::log(' '. Console::text('Sample:', 'underlined', 'bold'));
13
+Console::log(' '.Console::text('Sample:', 'underlined', 'bold'));
14 14
 
15 15
 // -----------------
16 16
 // sample start here
Please login to merge, or discard this patch.
demo/demo.bluescreen.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ .'/../vendor/autoload.php';
2
+require_once __DIR__.'/../vendor/autoload.php';
3 3
 use Kristuff\Mishell\Console;
4 4
 
5 5
 // *open* new window
@@ -10,16 +10,16 @@  discard block
 block discarded – undo
10 10
 $cols = Console::getColumns();
11 11
 $middle = round($lines/2);
12 12
 
13
-for ($i= 0; $i <= $lines ; $i++){
13
+for ($i = 0; $i <= $lines; $i++) {
14 14
 
15
-    switch($i){
16
-        case $middle -1:
15
+    switch ($i) {
16
+        case $middle-1:
17 17
             Console::log(Console::pad(":(   Houston, we've had a problem...", $cols, ' ', STR_PAD_BOTH), 'white', 'blue');
18 18
             break;
19 19
         case $middle :
20 20
             Console::log(Console::pad('an error occurred in my head,', $cols, ' ', STR_PAD_BOTH), 'white', 'blue');
21 21
             break;
22
-        case $middle +1:
22
+        case $middle+1:
23 23
             Console::log(Console::pad('I really want you to see the blue screen of the death', $cols, ' ', STR_PAD_BOTH), 'white', 'blue');
24 24
             break;
25 25
         default:
Please login to merge, or discard this patch.
demo/demo.colors.php 2 patches
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.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@  discard block
 block discarded – undo
1 1
 <?php
2
-require_once __DIR__ .'/../vendor/autoload.php';
2
+require_once __DIR__.'/../vendor/autoload.php';
3 3
 use Kristuff\Mishell\Console;
4 4
 
5 5
 // headers
@@ -10,12 +10,12 @@  discard block
 block discarded – undo
10 10
 
11 11
 // loop into foregrounds
12 12
 $i = 1;
13
-foreach (Console::getStyles()['foregrounds'] as $color => $colorValue ){
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, 
18
-        Console::text(str_pad('I am a text color={' . $color .'}', 48), $color) => 50
17
+       "\\033[".$colorValue.'m'  => 15, 
18
+        Console::text(str_pad('I am a text color={'.$color.'}', 48), $color) => 50
19 19
     ]));
20 20
     $i++;
21 21
 }
Please login to merge, or discard this patch.