Passed
Push — master ( 6407fd...37d291 )
by Gordon
04:05 queued 01:59
created
src/AddDuplicationCheckTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Suilven\PHPTravisEnhancer;
4 4
 
Please login to merge, or discard this patch.
src/Abstraction/TaskBase.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Suilven\PHPTravisEnhancer\Abstraction;
4 4
 
@@ -30,26 +30,26 @@  discard block
 block discarded – undo
30 30
         $foundExisting = $helper->checkForExistingInEnv($yamlAsArray, $this->getFlag());
31 31
         if (!$foundExisting) {
32 32
             // add a matrix entry
33
-            $yamlAsArray['matrix']['include'][] = [
33
+            $yamlAsArray[ 'matrix' ][ 'include' ][ ] = [
34 34
                 'php' => 7.4,
35 35
                 'env' => $this->getFlag() . '=1',
36 36
             ];
37 37
 
38 38
             /** @var string $prefix the bash prefix to check for the flag being set */
39
-            $prefix = 'if [[ $' . $this->getFlag() .' ]]; then ';
39
+            $prefix = 'if [[ $' . $this->getFlag() . ' ]]; then ';
40 40
 
41 41
             $beforeScript = $this->getBeforeScript();
42 42
             if (isset($beforeScript)) {
43 43
                 // install jdscpd, node tool, for duplication detection
44 44
                 $helper->ensurePathExistsInYaml($yamlAsArray, 'before_script');
45
-                $yamlAsArray['before_script'][] = $prefix . $beforeScript . '  ;fi';
45
+                $yamlAsArray[ 'before_script' ][ ] = $prefix . $beforeScript . '  ;fi';
46 46
             }
47 47
 
48 48
             $script = $this->getScript();
49 49
             if (isset($script)) {
50 50
                 // run jscpd on src and tests dir
51 51
                 $helper->ensurePathExistsInYaml($yamlAsArray, 'script');
52
-                $yamlAsArray['script'][] = $prefix . $this->getScript() . ' ; fi';
52
+                $yamlAsArray[ 'script' ][ ] = $prefix . $this->getScript() . ' ; fi';
53 53
             }
54 54
         }
55 55
 
Please login to merge, or discard this patch.
src/IFace/Task.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Suilven\PHPTravisEnhancer\IFace;
4 4
 
Please login to merge, or discard this patch.
src/Helper/TravisYMLHelper.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Suilven\PHPTravisEnhancer\Helper;
4 4
 
@@ -34,15 +34,15 @@  discard block
 block discarded – undo
34 34
     {
35 35
         $pathParts = \explode('/', $path);
36 36
         $part = \array_shift($pathParts);
37
-        if (!isset($yamlAsArray[$part])) {
38
-            $yamlAsArray[$part] = [];
37
+        if (!isset($yamlAsArray[ $part ])) {
38
+            $yamlAsArray[ $part ] = [ ];
39 39
         }
40 40
         $remainingPath = \implode('/', $pathParts);
41 41
         if (\sizeof($pathParts) === 0) {
42 42
             return;
43 43
         }
44 44
 
45
-        $this->ensurePathExistsInYaml($yamlAsArray[$part], $remainingPath);
45
+        $this->ensurePathExistsInYaml($yamlAsArray[ $part ], $remainingPath);
46 46
     }
47 47
 
48 48
 
@@ -58,8 +58,8 @@  discard block
 block discarded – undo
58 58
     public function checkForExistingInEnv(array $yamlAsArray, string $flag): bool
59 59
     {
60 60
         $foundExisting = false;
61
-        foreach ($yamlAsArray['matrix']['include'] as $entry) {
62
-            $env = $entry['env'];
61
+        foreach ($yamlAsArray[ 'matrix' ][ 'include' ] as $entry) {
62
+            $env = $entry[ 'env' ];
63 63
             if ($env !== ($flag . '=1')) {
64 64
                 continue;
65 65
             }
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
      */
80 80
     public function loadTravis(): array
81 81
     {
82
-        $result = [];
82
+        $result = [ ];
83 83
         $path = \getcwd() . '/' . $this->travisFileName;
84 84
         if (\file_exists($this->travisFileName)) {
85 85
             $result = Yaml::parseFile($path);
Please login to merge, or discard this patch.
src/AddPHPLintTask.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types = 1);
1
+<?php declare(strict_types=1);
2 2
 
3 3
 namespace Suilven\PHPTravisEnhancer;
4 4
 
Please login to merge, or discard this patch.