Passed
Branch master (8c9bff)
by Petr
07:50
created
Category
run/Help.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
             $this->setTableHeaders(['Variable', 'Cli key', 'Short key', 'Current value', 'Description']);
50 50
             foreach ($task->getParams()->getAvailableOptions() as $param) {
51 51
                 /** @var Params\Option $param */
52
-                $this->setTableDataLine([$param->getVariable(), $param->getCliKey(), (string)$param->getShort(), (string)$param->getValue(), $param->getDescription()]);
52
+                $this->setTableDataLine([$param->getVariable(), $param->getCliKey(), (string) $param->getShort(), (string) $param->getValue(), $param->getDescription()]);
53 53
             }
54 54
             $this->dumpTable();
55 55
 
Please login to merge, or discard this patch.
run/Lister.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@
 block discarded – undo
72 72
         if (!is_dir($path)) {
73 73
             throw new CliprException(sprintf('<redbg> !!! </redbg> Path leads to something unreadable. Path: <yellow>%s</yellow>', $path));
74 74
         }
75
-        $allFiles = array_diff((array)scandir($path), [false, '', '.', '..']);
75
+        $allFiles = array_diff((array) scandir($path), [false, '', '.', '..']);
76 76
         $files = array_filter($allFiles, [$this, 'onlyPhp']);
77 77
         if (empty($files) && !$skipEmpty) {
78 78
             throw new CliprException(sprintf('<redbg> !!! </redbg> No usable files returned. Path: <yellow>%s</yellow>', $path));
Please login to merge, or discard this patch.
php-src/Clipr.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         // for parsing default params it's necessary to load another task
48 48
         $dummy = new Tasks\DummyTask();
49 49
         $dummy->initTask(new Output\Clear(), $this->variables->getInArray(), $this->loader);
50
-        $this->sources->determineInput((bool)$dummy->webOutput, (bool)$dummy->noColor);
50
+        $this->sources->determineInput((bool) $dummy->webOutput, (bool) $dummy->noColor);
51 51
 
52 52
         // now we know necessary input data, so we can initialize real task
53 53
         $inputs = $this->variables->getInArray(null, $this->sources->getEntryTypes());
Please login to merge, or discard this patch.
php-src/Clipr/Paths.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,7 +101,7 @@
 block discarded – undo
101 101
                 $namespaced = strtr($namespaced, DIRECTORY_SEPARATOR, '\\');
102 102
                 // remove ext
103 103
                 $withExt = mb_strripos($file, ISources::EXT_PHP);
104
-                $withoutExt = (false !== $withExt) ? mb_substr($file, 0, $withExt) : $file ;
104
+                $withoutExt = (false !== $withExt) ? mb_substr($file, 0, $withExt) : $file;
105 105
                 // return named class
106 106
                 return $namespaced . $withoutExt;
107 107
             }
Please login to merge, or discard this patch.
php-src/Clipr/Useful.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public static function mb_str_pad(string $input, int $pad_length, string $pad_string = ' ', int $pad_type = STR_PAD_RIGHT): string
27 27
     {
28
-        $diff = strlen( $input ) - mb_strlen( $input );
29
-        return str_pad( $input, $pad_length + $diff, $pad_string, $pad_type );
28
+        $diff = strlen($input) - mb_strlen($input);
29
+        return str_pad($input, $pad_length + $diff, $pad_string, $pad_type);
30 30
     }
31 31
 
32 32
     /**
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
     public static function sanitizeClass(string $input): string
51 51
     {
52 52
         $input = strtr($input, [':' => '\\', '/' => '\\']);
53
-        return ('\\' == $input[0]) ? mb_substr($input, 1) : $input ;
53
+        return ('\\' == $input[0]) ? mb_substr($input, 1) : $input;
54 54
     }
55 55
 
56 56
     public static function getTaskCall(object $class): string
Please login to merge, or discard this patch.
php-tests/RunTests/AllTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -160,6 +160,6 @@
 block discarded – undo
160 160
 {
161 161
     public function getTask(string $classFromParam): ?ATask
162 162
     {
163
-        return 'test' == $classFromParam ? new XTask() : null ;
163
+        return 'test' == $classFromParam ? new XTask() : null;
164 164
     }
165 165
 }
Please login to merge, or discard this patch.
php-tests/TasksTests/ParamsTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
     public function testOption(): void
13 13
     {
14 14
         $instance = new Params\Option();
15
-        $instance->setData('mnb', 'vcx', 'pewrit','tdtr', null, 'rsef');
15
+        $instance->setData('mnb', 'vcx', 'pewrit', 'tdtr', null, 'rsef');
16 16
         $instance->setValue('zrsg');
17 17
         $this->assertEquals('zrsg', $instance->getValue());
18 18
         $this->assertEquals('mnb', $instance->getVariable());
Please login to merge, or discard this patch.
php-tests/OutputsTests/PrettyTableTest.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
         $this->assertEmpty($instance->getTable()->getHeader());
16 16
         $this->assertEmpty($instance->getTable()->getSeparator());
17 17
         $instance->setTableHeaders(['poi', 'uzt']);
18
-        $instance->setTableDataLine(['mnbv','lkjhg']);
18
+        $instance->setTableDataLine(['mnbv', 'lkjhg']);
19 19
         $instance->dumpTable();
20 20
         $this->assertEquals('| ---- | ----- |'
21 21
             . PHP_EOL . '| poi  | uzt   |'
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
         $instance->setTableColors(['abc', 'def']);
32 32
         $instance->setTableHeaders(['poi', 'uzt']);
33 33
         $instance->setTableColorsHeader(['okm', 'ijn']);
34
-        $instance->setTableDataLine(['mnbv','lkjhg']);
34
+        $instance->setTableDataLine(['mnbv', 'lkjhg']);
35 35
         $instance->dumpTable();
36 36
         $this->assertEquals('| <okm>----</okm> | <ijn>-----</ijn> |'
37 37
             . PHP_EOL . '| <okm>poi </okm> | <ijn>uzt  </ijn> |'
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
         $instance->setTableColors(['abc', 'def']);
48 48
         $instance->setTableHeaders(['poi', 'uzt']);
49 49
         $instance->setTableColorsHeader(['okm', 'ijn']);
50
-        $instance->setTableDataLine(['mnbv','lkjhg']);
50
+        $instance->setTableDataLine(['mnbv', 'lkjhg']);
51 51
         $instance->getTable()->setColor(2, 'tre');
52 52
         $instance->getTable()->setHeader(2, 'vgz');
53 53
         $instance->getTable()->setColorHeader(2, 'tre');
Please login to merge, or discard this patch.
php-tests/LoadersTests/LoaderTest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -60,6 +60,6 @@
 block discarded – undo
60 60
 {
61 61
     public function getTask(string $classFromParam): ?ATask
62 62
     {
63
-        return 'test' == $classFromParam ? new XTask() : null ;
63
+        return 'test' == $classFromParam ? new XTask() : null;
64 64
     }
65 65
 }
Please login to merge, or discard this patch.