Completed
Push — master ( 634f14...5521c0 )
by Sebastian
02:54
created
src/Analysers/LibraryChanges.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@
 block discarded – undo
152 152
     }
153 153
 
154 154
     /**
155
-     * @param \PhpParser\Node\Name|string $name
155
+     * @param Name $name
156 156
      * @param int $line
157 157
      */
158 158
     private function handleFunctionName($name, $line = -1)
Please login to merge, or discard this patch.
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
      * @param \Pvra\Analyser $analyser
46 46
      * @param \Pvra\InformationProvider\LibraryInformation $information
47 47
      */
48
-    public function __construct(array $options = [], Analyser $analyser = null, LibraryInformation $information = null)
48
+    public function __construct(array $options = [ ], Analyser $analyser = null, LibraryInformation $information = null)
49 49
     {
50 50
         parent::__construct($options, $analyser);
51 51
 
@@ -111,7 +111,7 @@  discard block
 block discarded – undo
111 111
             $name = (string)$name;
112 112
         }
113 113
 
114
-        return [$name, $line];
114
+        return [ $name, $line ];
115 115
     }
116 116
 
117 117
     /**
@@ -122,31 +122,31 @@  discard block
 block discarded – undo
122 122
     {
123 123
         list($name, $line) = $this->prepareNameAndLine($name, $line);
124 124
         $info = $this->getLibraryInformation()->getClassInfo($name);
125
-        if ($this->mode & self::MODE_ADDITION && $info['addition'] !== null) {
125
+        if ($this->mode & self::MODE_ADDITION && $info[ 'addition' ] !== null) {
126 126
             $this->getResult()->addArbitraryRequirement(
127
-                $info['addition'],
127
+                $info[ 'addition' ],
128 128
                 $line,
129 129
                 null,
130 130
                 Reason::LIB_CLASS_ADDITION,
131
-                ['className' => $name]
131
+                [ 'className' => $name ]
132 132
             );
133 133
         }
134
-        if ($this->mode & self::MODE_DEPRECATION && $info['deprecation'] !== null) {
134
+        if ($this->mode & self::MODE_DEPRECATION && $info[ 'deprecation' ] !== null) {
135 135
             $this->getResult()->addArbitraryLimit(
136
-                $info['deprecation'],
136
+                $info[ 'deprecation' ],
137 137
                 $line,
138 138
                 null,
139 139
                 Reason::LIB_CLASS_DEPRECATION,
140
-                ['className' => $name]
140
+                [ 'className' => $name ]
141 141
             );
142 142
         }
143
-        if ($this->mode & self::MODE_REMOVAL && $info['removal'] !== null) {
143
+        if ($this->mode & self::MODE_REMOVAL && $info[ 'removal' ] !== null) {
144 144
             $this->getResult()->addArbitraryLimit(
145
-                $info['removal'],
145
+                $info[ 'removal' ],
146 146
                 $line,
147 147
                 null,
148 148
                 Reason::LIB_CLASS_REMOVAL,
149
-                ['className' => $name]
149
+                [ 'className' => $name ]
150 150
             );
151 151
         }
152 152
     }
@@ -159,31 +159,31 @@  discard block
 block discarded – undo
159 159
     {
160 160
         list($name, $line) = $this->prepareNameAndLine($name, $line);
161 161
         $info = $this->getLibraryInformation()->getFunctionInfo($name);
162
-        if ($this->mode & self::MODE_ADDITION && $info['addition'] !== null) {
162
+        if ($this->mode & self::MODE_ADDITION && $info[ 'addition' ] !== null) {
163 163
             $this->getResult()->addArbitraryRequirement(
164
-                $info['addition'],
164
+                $info[ 'addition' ],
165 165
                 $line,
166 166
                 null,
167 167
                 Reason::LIB_FUNCTION_ADDITION,
168
-                ['functionName' => $name]
168
+                [ 'functionName' => $name ]
169 169
             );
170 170
         }
171
-        if ($this->mode & self::MODE_DEPRECATION && $info['deprecation'] !== null) {
171
+        if ($this->mode & self::MODE_DEPRECATION && $info[ 'deprecation' ] !== null) {
172 172
             $this->getResult()->addArbitraryLimit(
173
-                $info['deprecation'],
173
+                $info[ 'deprecation' ],
174 174
                 $line,
175 175
                 null,
176 176
                 Reason::LIB_FUNCTION_DEPRECATION,
177
-                ['functionName' => $name]
177
+                [ 'functionName' => $name ]
178 178
             );
179 179
         }
180
-        if ($this->mode & self::MODE_REMOVAL && $info['removal'] !== null) {
180
+        if ($this->mode & self::MODE_REMOVAL && $info[ 'removal' ] !== null) {
181 181
             $this->getResult()->addArbitraryLimit(
182
-                $info['removal'],
182
+                $info[ 'removal' ],
183 183
                 $line,
184 184
                 null,
185 185
                 Reason::LIB_FUNCTION_REMOVAL,
186
-                ['functionName' => $name]
186
+                [ 'functionName' => $name ]
187 187
             );
188 188
         }
189 189
     }
@@ -196,31 +196,31 @@  discard block
 block discarded – undo
196 196
     {
197 197
         list($name, $line) = $this->prepareNameAndLine($name, $line);
198 198
         $info = $this->getLibraryInformation()->getConstantInfo($name);
199
-        if (($this->mode & self::MODE_ADDITION) && $info['addition'] !== null) {
199
+        if (($this->mode & self::MODE_ADDITION) && $info[ 'addition' ] !== null) {
200 200
             $this->getResult()->addArbitraryRequirement(
201
-                $info['addition'],
201
+                $info[ 'addition' ],
202 202
                 $line,
203 203
                 null,
204 204
                 Reason::LIB_CONSTANT_ADDITION,
205
-                ['constantName' => $name]
205
+                [ 'constantName' => $name ]
206 206
             );
207 207
         }
208
-        if (($this->mode & self::MODE_DEPRECATION) && $info['deprecation'] !== null) {
208
+        if (($this->mode & self::MODE_DEPRECATION) && $info[ 'deprecation' ] !== null) {
209 209
             $this->getResult()->addArbitraryLimit(
210
-                $info['deprecation'],
210
+                $info[ 'deprecation' ],
211 211
                 $line,
212 212
                 null,
213 213
                 Reason::LIB_CONSTANT_DEPRECATION,
214
-                ['constantName' => $name]
214
+                [ 'constantName' => $name ]
215 215
             );
216 216
         }
217
-        if (($this->mode & self::MODE_REMOVAL) && $info['removal'] !== null) {
217
+        if (($this->mode & self::MODE_REMOVAL) && $info[ 'removal' ] !== null) {
218 218
             $this->getResult()->addArbitraryLimit(
219
-                $info['removal'],
219
+                $info[ 'removal' ],
220 220
                 $line,
221 221
                 null,
222 222
                 Reason::LIB_CONSTANT_REMOVAL,
223
-                ['constantName' => $name]
223
+                [ 'constantName' => $name ]
224 224
             );
225 225
         }
226 226
     }
@@ -256,13 +256,13 @@  discard block
 block discarded – undo
256 256
         } elseif ($node instanceof Node\Stmt\Class_
257 257
             || $node instanceof Node\Stmt\Interface_
258 258
         ) {
259
-            $names = [];
259
+            $names = [ ];
260 260
             if (!empty($node->implements)) {
261 261
                 $names += $node->implements;
262 262
             }
263 263
             if (!empty($node->extends)) {
264 264
                 if ($node->extends instanceof Name) {
265
-                    $names[] = $node->extends;
265
+                    $names[ ] = $node->extends;
266 266
                 } else {
267 267
                     $names += $node->extends;
268 268
                 }
Please login to merge, or discard this patch.
src/AnalysisResult.php 2 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 
119 119
     /**
120 120
      * @param string $version
121
-     * @return int
121
+     * @return double
122 122
      * @throws \Exception
123 123
      */
124 124
     private function calculateVersionIdFromString($version)
@@ -438,7 +438,7 @@  discard block
 block discarded – undo
438 438
 
439 439
     /**
440 440
      * @inheritdoc
441
-     * @return \ArrayIterator|array|Reasoning[]
441
+     * @return \ArrayIterator
442 442
      */
443 443
     public function getIterator()
444 444
     {
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
     /**
48 48
      * @var array|Reasoning[]
49 49
      */
50
-    private $requirements = [];
50
+    private $requirements = [ ];
51 51
 
52 52
     /**
53 53
      * @var array|Reasoning[]
54 54
      */
55
-    private $limits = [];
55
+    private $limits = [ ];
56 56
 
57 57
     /**
58 58
      * @var string|null
@@ -132,9 +132,9 @@  discard block
 block discarded – undo
132 132
                 $version));
133 133
         }
134 134
 
135
-        $versionComponents += [2 => 0];
135
+        $versionComponents += [ 2 => 0 ];
136 136
 
137
-        return $versionComponents[0] * 10000 + $versionComponents[1] * 100 + $versionComponents[2];
137
+        return $versionComponents[ 0 ] * 10000 + $versionComponents[ 1 ] * 100 + $versionComponents[ 2 ];
138 138
     }
139 139
 
140 140
     /**
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $line = -1,
234 234
         $msg = null,
235 235
         $reason = Reason::UNKNOWN,
236
-        array $data = []
236
+        array $data = [ ]
237 237
     ) {
238 238
         $this->addArbitraryVersionConstraint(self::VERSION_LIMIT_MAX, $version, $line, $msg, $reason,
239 239
             $data);
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
      * @return $this
255 255
      * @throws \LogicException Thrown if the reason is unknown or does not have a version requirement associated.
256 256
      */
257
-    public function addRequirement($reason, $line = -1, $msg = null, array $data = [])
257
+    public function addRequirement($reason, $line = -1, $msg = null, array $data = [ ])
258 258
     {
259 259
         $version = Reason::getVersionFromReason($reason);
260 260
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
      * @param array $data
277 277
      * @return $this
278 278
      */
279
-    public function addLimit($reason, $line = -1, $msg = null, array $data = [])
279
+    public function addLimit($reason, $line = -1, $msg = null, array $data = [ ])
280 280
     {
281 281
         $version = Reason::getVersionFromReason($reason);
282 282
 
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
         $line = -1,
305 305
         $msg = null,
306 306
         $reason = Reason::UNKNOWN,
307
-        array $data = []
307
+        array $data = [ ]
308 308
     ) {
309 309
         $this->addArbitraryVersionConstraint(self::VERSION_LIMIT_MIN, $version, $line, $msg, $reason,
310 310
             $data);
@@ -326,7 +326,7 @@  discard block
 block discarded – undo
326 326
         $line = -1,
327 327
         $msg = null,
328 328
         $reason = Reason::UNKNOWN,
329
-        array $data = []
329
+        array $data = [ ]
330 330
     ) {
331 331
         if ($this->isSealed()) {
332 332
             throw new \RuntimeException('Impossible to write to already sealed result');
@@ -336,9 +336,9 @@  discard block
 block discarded – undo
336 336
         $this->count++;
337 337
 
338 338
         if ($type === self::VERSION_LIMIT_MAX) {
339
-            $this->requirements[ $version ][] = new Reasoning($reason, $line, $this, $version, $msg, $data);
339
+            $this->requirements[ $version ][ ] = new Reasoning($reason, $line, $this, $version, $msg, $data);
340 340
         } elseif ($type === self::VERSION_LIMIT_MIN) {
341
-            $this->limits[ $version ][] = new Reasoning($reason, $line, $this, $version, $msg, $data);
341
+            $this->limits[ $version ][ ] = new Reasoning($reason, $line, $this, $version, $msg, $data);
342 342
         }
343 343
     }
344 344
 
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
             return $this->requirements[ $version ];
381 381
         }
382 382
 
383
-        return [];
383
+        return [ ];
384 384
     }
385 385
 
386 386
     /**
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
             return $this->limits[ $version ];
394 394
         }
395 395
 
396
-        return [];
396
+        return [ ];
397 397
     }
398 398
 
399 399
     /**
@@ -436,8 +436,8 @@  discard block
 block discarded – undo
436 436
     public function getIterator()
437 437
     {
438 438
         $iterator = new \ArrayIterator();
439
-        $data = [$this->getRequirements(), $this->getLimits()];
440
-        array_walk_recursive($data, function ($value) use ($iterator) {
439
+        $data = [ $this->getRequirements(), $this->getLimits() ];
440
+        array_walk_recursive($data, function($value) use ($iterator) {
441 441
             if ($value instanceof Reasoning) {
442 442
                 $iterator->append($value);
443 443
             }
Please login to merge, or discard this patch.
src/Result/Reason.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -182,7 +182,7 @@
 block discarded – undo
182 182
      * This method returns an array having the constants defined by this class as keys and their required
183 183
      * php versions as values.
184 184
      *
185
-     * @return array
185
+     * @return string[]
186 186
      */
187 187
     protected static function getReasonToVersionBaseValues()
188 188
     {
Please login to merge, or discard this patch.
src/Result/ResultFormatter/ResultFormatter.php 2 patches
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -29,6 +29,7 @@
 block discarded – undo
29 29
 {
30 30
     /**
31 31
      * @param array $options
32
+     * @return void
32 33
      */
33 34
     public function __construct(array $options = []);
34 35
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
     /**
31 31
      * @param array $options
32 32
      */
33
-    public function __construct(array $options = []);
33
+    public function __construct(array $options = [ ]);
34 34
 
35 35
     /**
36 36
      * Generate a string representation of a `Result\Collection`
Please login to merge, or discard this patch.
src/InformationProvider/LibraryInformation.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -27,15 +27,15 @@  discard block
 block discarded – undo
27 27
     /**
28 28
      * @var array
29 29
      */
30
-    private $additions = [];
30
+    private $additions = [ ];
31 31
     /**
32 32
      * @var array
33 33
      */
34
-    private $deprecations = [];
34
+    private $deprecations = [ ];
35 35
     /**
36 36
      * @var array
37 37
      */
38
-    private $removals = [];
38
+    private $removals = [ ];
39 39
 
40 40
     /**
41 41
      * Create a new instance and load default information
@@ -76,19 +76,19 @@  discard block
 block discarded – undo
76 76
      *
77 77
      * @param array $data Array representation of data to represent
78 78
      */
79
-    public function __construct(array $data = [])
79
+    public function __construct(array $data = [ ])
80 80
     {
81
-        if (isset($data['additions'])) {
82
-            $this->additions = $data['additions'];
81
+        if (isset($data[ 'additions' ])) {
82
+            $this->additions = $data[ 'additions' ];
83 83
         }
84
-        if (isset($data['deprecations'])) {
85
-            $this->deprecations = $data['deprecations'];
84
+        if (isset($data[ 'deprecations' ])) {
85
+            $this->deprecations = $data[ 'deprecations' ];
86 86
         }
87
-        if (isset($data['removals'])) {
88
-            $this->removals = $data['removals'];
87
+        if (isset($data[ 'removals' ])) {
88
+            $this->removals = $data[ 'removals' ];
89 89
         }
90 90
 
91
-        $baseArray = ['class' => [], 'function' => [], 'constant' => []];
91
+        $baseArray = [ 'class' => [ ], 'function' => [ ], 'constant' => [ ] ];
92 92
         $this->additions += $baseArray;
93 93
         $this->deprecations += $baseArray;
94 94
         $this->removals += $baseArray;
@@ -112,9 +112,9 @@  discard block
 block discarded – undo
112 112
     public function mergeWith(LibraryInformationInterface $info)
113 113
     {
114 114
         $newInfo = $info->toArray();
115
-        $this->additions = array_replace_recursive($this->additions, $newInfo['additions']);
116
-        $this->deprecations = array_replace_recursive($this->deprecations, $newInfo['deprecations']);
117
-        $this->removals = array_replace_recursive($this->removals, $newInfo['removals']);
115
+        $this->additions = array_replace_recursive($this->additions, $newInfo[ 'additions' ]);
116
+        $this->deprecations = array_replace_recursive($this->deprecations, $newInfo[ 'deprecations' ]);
117
+        $this->removals = array_replace_recursive($this->removals, $newInfo[ 'removals' ]);
118 118
         return $this;
119 119
     }
120 120
 
Please login to merge, or discard this patch.
src/Analysers/LanguageFeatureAnalyser.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      * @param \Pvra\Analyser $analyser
65 65
      * @see setOwningAnalyser() Set the owning analyser
66 66
      */
67
-    public function __construct(array $options = [], Analyser $analyser = null)
67
+    public function __construct(array $options = [ ], Analyser $analyser = null)
68 68
     {
69 69
         $this->options = $options;
70 70
         $this->mode = $this->getOption('mode', self::MODE_ALL);
Please login to merge, or discard this patch.
src/Lexer/ExtendedEmulativeLexer.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     public static function createDefaultInstance()
42 42
     {
43 43
         $class = get_called_class();
44
-        return new $class(['usedAttributes' => ['startLine', 'endLine', 'startFilePos', 'startTokenPos']]);
44
+        return new $class([ 'usedAttributes' => [ 'startLine', 'endLine', 'startFilePos', 'startTokenPos' ] ]);
45 45
     }
46 46
 
47 47
     /**
@@ -64,19 +64,19 @@  discard block
 block discarded – undo
64 64
 
65 65
         if ($tokenId === Tokens::T_LNUMBER || $tokenId === Tokens::T_DNUMBER) {
66 66
             // could also use $startAttributes, doesn't really matter here
67
-            $endAttributes['originalValue'] = $value;
67
+            $endAttributes[ 'originalValue' ] = $value;
68 68
         } elseif ($tokenId === Tokens::T_START_HEREDOC) {
69
-            $startAttributes['isDocSyntax'] = true;
70
-            if (substr($this->code, $startAttributes['startFilePos'] + 3, 1) === '\'') {
71
-                $startAttributes['isNowDoc'] = true;
69
+            $startAttributes[ 'isDocSyntax' ] = true;
70
+            if (substr($this->code, $startAttributes[ 'startFilePos' ] + 3, 1) === '\'') {
71
+                $startAttributes[ 'isNowDoc' ] = true;
72 72
             } else {
73
-                $startAttributes['isHereDoc'] = true;
73
+                $startAttributes[ 'isHereDoc' ] = true;
74 74
             }
75 75
         } elseif ($tokenId === Tokens::T_ARRAY) {
76
-            $startAttributes['traditionalArray'] = true;
76
+            $startAttributes[ 'traditionalArray' ] = true;
77 77
         } elseif ($tokenId === Tokens::T_ECHO) {
78
-            if (substr($this->code, $startAttributes['startFilePos'], 3) === '<?=') {
79
-                $startAttributes['isShortEchoTag'] = true;
78
+            if (substr($this->code, $startAttributes[ 'startFilePos' ], 3) === '<?=') {
79
+                $startAttributes[ 'isShortEchoTag' ] = true;
80 80
             }
81 81
         }
82 82
 
Please login to merge, or discard this patch.
src/Console/Commands/Debug/DumpTokenListCommand.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
             foreach ($tokens as $token) {
56 56
                 if (is_array($token)) {
57
-                    $out->writeln(sprintf('%s(%s) "%s"', token_name($token[0]), $token[0], $token[1]));
57
+                    $out->writeln(sprintf('%s(%s) "%s"', token_name($token[ 0 ]), $token[ 0 ], $token[ 1 ]));
58 58
                 } else {
59 59
                     $out->writeln('"' . $token . '"');
60 60
                 }
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
             $offset = 0;
66 66
             while ($id = $lexer->getNextToken()) {
67 67
                 if (is_string($name = $this->libTokenToTokenName($id))) {
68
-                    $out->writeln($name . '(' . $lexer->getTokens()[ $offset ][0] . ') ' . $lexer->getTokens()[ $offset ][1]);
68
+                    $out->writeln($name . '(' . $lexer->getTokens()[ $offset ][ 0 ] . ') ' . $lexer->getTokens()[ $offset ][ 1 ]);
69 69
                 } else {
70 70
                     $out->writeln('Discarded token with id ' . $id);
71 71
                 }
Please login to merge, or discard this patch.
src/Console/Commands/SelfUpdateCommand.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
     protected function configure()
44 44
     {
45 45
         $this->setName('self-update')
46
-            ->setAliases(['selfupdate', 'update'])
46
+            ->setAliases([ 'selfupdate', 'update' ])
47 47
             ->setDescription('Checks for a newer tagged version in the github repository.');
48 48
         $this->addOption('repo-slug', 'r', InputOption::VALUE_REQUIRED, 'Source repository', self::DEFAULT_REPO_SLUG)
49 49
             ->addOption('api-root', 'a', InputOption::VALUE_REQUIRED, 'Api root url', self::DEFAULT_API_ROOT);
@@ -69,13 +69,13 @@  discard block
 block discarded – undo
69 69
         list($ghReleases, $header) = $this->getReleases();
70 70
         if ($in->getOption('verbose')) {
71 71
             $headers = $this->parseHeader($header);
72
-            $out->writeln('Github api limit: ' . $headers['X-RateLimit-Limit']);
73
-            $out->writeln('Github api limit remaining: ' . $headers['X-RateLimit-Remaining']);
72
+            $out->writeln('Github api limit: ' . $headers[ 'X-RateLimit-Limit' ]);
73
+            $out->writeln('Github api limit remaining: ' . $headers[ 'X-RateLimit-Remaining' ]);
74 74
         }
75 75
         $ghReleasesContent = json_decode($ghReleases, true);
76 76
         unset($ghReleases);
77 77
         if (!empty($ghReleasesContent)) {
78
-            $remoteVersion = substr($ghReleasesContent[0]['tag_name'], 1);
78
+            $remoteVersion = substr($ghReleasesContent[ 0 ][ 'tag_name' ], 1);
79 79
             $out->writeln('Your version: ' . $this->getApplication()->getVersion() . '(' . $this->getComparableVersion() . ')');
80 80
             $out->writeln('Current remote version is: ' . $remoteVersion);
81 81
             $compared = version_compare($this->getComparableVersion(), $remoteVersion);
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 if ($this->getHelper('question')->ask($in, $out, $question)) {
86 86
                     $out->writeln('Upgrading...');
87 87
                     $temp = tmpfile();
88
-                    stream_copy_to_stream(fopen($this->getPharUrlFromAssetArray($ghReleasesContent[0]['assets']), 'rb'),
88
+                    stream_copy_to_stream(fopen($this->getPharUrlFromAssetArray($ghReleasesContent[ 0 ][ 'assets' ]), 'rb'),
89 89
                         $temp);
90 90
                     rewind($temp);
91 91
                     $running = Phar::running(false);
@@ -126,12 +126,12 @@  discard block
 block discarded – undo
126 126
     {
127 127
         $response = file_get_contents(sprintf('%srepos/%s/releases%s', $this->apiRoot, $this->slug, $target), 0,
128 128
             $this->getNewDefaultStreamContext());
129
-        return [$response, $http_response_header];
129
+        return [ $response, $http_response_header ];
130 130
     }
131 131
 
132 132
     private function parseHeader(array $headerArray)
133 133
     {
134
-        $headers = [];
134
+        $headers = [ ];
135 135
         foreach ($headerArray as $num => $headerLine) {
136 136
             if ($num === 0) {
137 137
                 // status code
@@ -151,9 +151,9 @@  discard block
 block discarded – undo
151 151
             $localVersion = ltrim($this->getApplication()->getVersion(), 'v');
152 152
             preg_match('/(?P<major>[\\d]+).(?P<minor>[\\d]+).(?P<patch>[\\d]+)-(?P<commitCount>[\\d]+)-(g)?(?P<hash>[0-9a-f]{5,40})/i',
153 153
                 $localVersion, $matches);
154
-            $comparableVersion = sprintf('%d.%d.%d', $matches['major'], $matches['minor'], $matches['patch']);
155
-            if (isset($matches['commitCount'])) {
156
-                $comparableVersion .= '.' . $matches['commitCount'];
154
+            $comparableVersion = sprintf('%d.%d.%d', $matches[ 'major' ], $matches[ 'minor' ], $matches[ 'patch' ]);
155
+            if (isset($matches[ 'commitCount' ])) {
156
+                $comparableVersion .= '.' . $matches[ 'commitCount' ];
157 157
             }
158 158
         }
159 159
         return $comparableVersion;
@@ -168,8 +168,8 @@  discard block
 block discarded – undo
168 168
     {
169 169
         if (!empty($assets)) {
170 170
             foreach ($assets as $asset) {
171
-                if ($asset['name'] === 'pvra.phar') {
172
-                    return $asset['browser_download_url'];
171
+                if ($asset[ 'name' ] === 'pvra.phar') {
172
+                    return $asset[ 'browser_download_url' ];
173 173
                 }
174 174
             }
175 175
         }
Please login to merge, or discard this patch.