Passed
Branch test (82e107)
by Tom
02:13
created
src/PharBuild/Builder.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
      */
161 161
     public function snapShot()
162 162
     {
163
-        return function ($file) {
163
+        return function($file) {
164 164
             $source = fopen($file, 'r');
165 165
             if (false === $source) {
166 166
                 $this->err(sprintf('failed to open for reading: %s', $file));
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
      */
196 196
     public function dropFirstLine()
197 197
     {
198
-        return function ($file) {
198
+        return function($file) {
199 199
             $lines = file($file);
200 200
             if (false === $lines) {
201 201
                 $this->err(sprintf('error reading file: %s', $file));
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
      */
218 218
     public function replace($that, $with)
219 219
     {
220
-        return function ($file) use ($that, $with) {
220
+        return function($file) use ($that, $with) {
221 221
             $buffer = file_get_contents($file);
222 222
             $buffer = strtr($buffer, array($that => $with));
223 223
 
@@ -659,13 +659,13 @@  discard block
 block discarded – undo
659 659
     private function _bfiles(Phar $phar, array $files)
660 660
     {
661 661
         $builders = array(
662
-            'fil' => function (array $nodes) use ($phar) {
662
+            'fil' => function(array $nodes) use ($phar) {
663 663
                 $result = $phar->buildFromIterator(
664 664
                     new \ArrayIterator($nodes)
665 665
                 );
666 666
                 return count($result);
667 667
             },
668
-            'str' => function (array $nodes) use ($phar) {
668
+            'str' => function(array $nodes) use ($phar) {
669 669
                 $count = 0;
670 670
                 foreach ($nodes as $localName => $contents) {
671 671
                     $phar->addFromString($localName, $contents);
Please login to merge, or discard this patch.
src/Cli/Vcs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@
 block discarded – undo
28 28
             return null;
29 29
         }
30 30
 
31
-        $path = substr($out, 0,-1);
31
+        $path = substr($out, 0, -1);
32 32
 
33 33
         if (!is_dir($path)) {
34 34
             return null;
Please login to merge, or discard this patch.
src/Lib.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -119,12 +119,12 @@
 block discarded – undo
119 119
             }
120 120
             // match
121 121
             foreach (array_unique(
122
-                     /** @scrutinizer ignore-type */
123
-                         preg_split(
124
-                             '~\\\\.(*SKIP)(*FAIL)|,~',
125
-                             $matches[2]
126
-                         )
127
-                     ) as $segment) {
122
+                        /** @scrutinizer ignore-type */
123
+                            preg_split(
124
+                                '~\\\\.(*SKIP)(*FAIL)|,~',
125
+                                $matches[2]
126
+                            )
127
+                        ) as $segment) {
128 128
                 $permutation = $matches[1] . $segment . $matches[3];
129 129
                 in_array($permutation, $stack, true) || $stack[] = $permutation;
130 130
             }
Please login to merge, or discard this patch.
src/PharBuild/Timestamps.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         );
128 128
 
129 129
         if (!isset($algos[$signatureAlgo])) {
130
-            throw new \UnexpectedValueException('Invalid hash algorithm given: '.$signatureAlgo.' expected one of Phar::MD5, Phar::SHA1, Phar::SHA256 or Phar::SHA512'); // @codeCoverageIgnore
130
+            throw new \UnexpectedValueException('Invalid hash algorithm given: ' . $signatureAlgo . ' expected one of Phar::MD5, Phar::SHA1, Phar::SHA256 or Phar::SHA512'); // @codeCoverageIgnore
131 131
         }
132 132
         $algo = $algos[$signatureAlgo];
133 133
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 
142 142
         $this->contents = substr($this->contents, 0, $pos) . $signature;
143 143
 
144
-        return (bool) file_put_contents($path, $this->contents);
144
+        return (bool)file_put_contents($path, $this->contents);
145 145
     }
146 146
 
147 147
     private function readUint($pos, $bytes)
Please login to merge, or discard this patch.
src/Cli/Args.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
      */
71 71
     public function getFirstRemainingOption()
72 72
     {
73
-        foreach($this->arguments as $argument) {
73
+        foreach ($this->arguments as $argument) {
74 74
             if (strlen($argument) < 2) {
75 75
                 continue;
76 76
             }
@@ -129,13 +129,13 @@  discard block
 block discarded – undo
129 129
             if ($argument !== $compare) {
130 130
                 continue;
131 131
             }
132
-            if (!isset($this->arguments[$index+1]) || $this->arguments[$index+1] === '--') {
132
+            if (!isset($this->arguments[$index + 1]) || $this->arguments[$index + 1] === '--') {
133 133
                 ArgsException::__(
134 134
                     sprintf("error: option '%s' requires an argument", $option)
135 135
                 );
136 136
             }
137 137
 
138
-            $result = $this->arguments[$index+1];
138
+            $result = $this->arguments[$index + 1];
139 139
             $consume = array($index, $index + 1);
140 140
         }
141 141
 
Please login to merge, or discard this patch.
src/Utility/App.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
             // @codeCoverageIgnoreStart
92 92
             $buffer = file_get_contents($installedFile);
93 93
             $struct = json_decode($buffer);
94
-            foreach ((array) $struct as $package) {
94
+            foreach ((array)$struct as $package) {
95 95
                 if (!isset($package->name) || $package->name !== 'ktomk/pipelines') {
96 96
                     continue;
97 97
                 }
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
         $streams = $this->streams;
379 379
         if ($args->hasOption('verbatim')) {
380 380
             $streams = new Streams();
381
-            $streams->copyHandle($this->streams,2);
381
+            $streams->copyHandle($this->streams, 2);
382 382
         }
383 383
 
384 384
         if ($option = $args->getFirstRemainingOption()) {
Please login to merge, or discard this patch.
src/Utility/FileShower.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
          * @param File $file
49 49
          * @return array|Step[]
50 50
          */
51
-        $iter = function (File $file) {
51
+        $iter = function(File $file) {
52 52
             $ids = $file->getPipelineIds();
53 53
             $return = array();
54 54
             foreach ($ids as $id) {
Please login to merge, or discard this patch.
src/Utility/FileOptions.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,9 +64,15 @@
 block discarded – undo
64 64
         $show = $args->hasOption('show');
65 65
         $list = $args->hasOption('list');
66 66
 
67
-        if ($images) return $this->shower()->showImages();
68
-        if ($show) return $this->shower()->showPipelines();
69
-        if ($list) return $this->shower()->showPipelineIds();
67
+        if ($images) {
68
+            return $this->shower()->showImages();
69
+        }
70
+        if ($show) {
71
+            return $this->shower()->showPipelines();
72
+        }
73
+        if ($list) {
74
+            return $this->shower()->showPipelineIds();
75
+        }
70 76
 
71 77
         return null;
72 78
     }
Please login to merge, or discard this patch.
src/Runner/Env.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
      */
119 119
     public function setPipelinesId($id)
120 120
     {
121
-        $list = (string) $this->getValue('PIPELINES_IDS');
121
+        $list = (string)$this->getValue('PIPELINES_IDS');
122 122
         $hashes = preg_split('~\s+~', $list, -1, PREG_SPLIT_NO_EMPTY);
123 123
         $hashes = array_map('strtolower', /** @scrutinizer ignore-type */ $hashes);
124 124
 
Please login to merge, or discard this patch.