Passed
Push — master ( a034e0...fb1aac )
by
unknown
03:23
created
vendor/composer/InstalledVersions.php 1 patch
Braces   +20 added lines, -31 removed lines patch added patch discarded remove patch
@@ -47,8 +47,7 @@  discard block
 block discarded – undo
47 47
      * @return string[]
48 48
      * @psalm-return list<string>
49 49
      */
50
-    public static function getInstalledPackages()
51
-    {
50
+    public static function getInstalledPackages() {
52 51
         $packages = array();
53 52
         foreach (self::getInstalled() as $installed) {
54 53
             $packages[] = array_keys($installed['versions']);
@@ -68,8 +67,7 @@  discard block
 block discarded – undo
68 67
      * @return string[]
69 68
      * @psalm-return list<string>
70 69
      */
71
-    public static function getInstalledPackagesByType($type)
72
-    {
70
+    public static function getInstalledPackagesByType($type) {
73 71
         $packagesByType = array();
74 72
 
75 73
         foreach (self::getInstalled() as $installed) {
@@ -92,8 +90,7 @@  discard block
 block discarded – undo
92 90
      * @param  bool   $includeDevRequirements
93 91
      * @return bool
94 92
      */
95
-    public static function isInstalled($packageName, $includeDevRequirements = true)
96
-    {
93
+    public static function isInstalled($packageName, $includeDevRequirements = true) {
97 94
         foreach (self::getInstalled() as $installed) {
98 95
             if (isset($installed['versions'][$packageName])) {
99 96
                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
@@ -115,8 +112,7 @@  discard block
 block discarded – undo
115 112
      * @param  string|null   $constraint  A version constraint to check for, if you pass one you have to make sure composer/semver is required by your package
116 113
      * @return bool
117 114
      */
118
-    public static function satisfies(VersionParser $parser, $packageName, $constraint)
119
-    {
115
+    public static function satisfies(VersionParser $parser, $packageName, $constraint) {
120 116
         $constraint = $parser->parseConstraints($constraint);
121 117
         $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
122 118
 
@@ -132,8 +128,7 @@  discard block
 block discarded – undo
132 128
      * @param  string $packageName
133 129
      * @return string Version constraint usable with composer/semver
134 130
      */
135
-    public static function getVersionRanges($packageName)
136
-    {
131
+    public static function getVersionRanges($packageName) {
137 132
         foreach (self::getInstalled() as $installed) {
138 133
             if (!isset($installed['versions'][$packageName])) {
139 134
                 continue;
@@ -163,8 +158,7 @@  discard block
 block discarded – undo
163 158
      * @param  string      $packageName
164 159
      * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
165 160
      */
166
-    public static function getVersion($packageName)
167
-    {
161
+    public static function getVersion($packageName) {
168 162
         foreach (self::getInstalled() as $installed) {
169 163
             if (!isset($installed['versions'][$packageName])) {
170 164
                 continue;
@@ -184,8 +178,7 @@  discard block
 block discarded – undo
184 178
      * @param  string      $packageName
185 179
      * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as version, use satisfies or getVersionRanges if you need to know if a given version is present
186 180
      */
187
-    public static function getPrettyVersion($packageName)
188
-    {
181
+    public static function getPrettyVersion($packageName) {
189 182
         foreach (self::getInstalled() as $installed) {
190 183
             if (!isset($installed['versions'][$packageName])) {
191 184
                 continue;
@@ -205,8 +198,7 @@  discard block
 block discarded – undo
205 198
      * @param  string      $packageName
206 199
      * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
207 200
      */
208
-    public static function getReference($packageName)
209
-    {
201
+    public static function getReference($packageName) {
210 202
         foreach (self::getInstalled() as $installed) {
211 203
             if (!isset($installed['versions'][$packageName])) {
212 204
                 continue;
@@ -226,8 +218,7 @@  discard block
 block discarded – undo
226 218
      * @param  string      $packageName
227 219
      * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as install path. Packages of type metapackages also have a null install path.
228 220
      */
229
-    public static function getInstallPath($packageName)
230
-    {
221
+    public static function getInstallPath($packageName) {
231 222
         foreach (self::getInstalled() as $installed) {
232 223
             if (!isset($installed['versions'][$packageName])) {
233 224
                 continue;
@@ -243,8 +234,7 @@  discard block
 block discarded – undo
243 234
      * @return array
244 235
      * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
245 236
      */
246
-    public static function getRootPackage()
247
-    {
237
+    public static function getRootPackage() {
248 238
         $installed = self::getInstalled();
249 239
 
250 240
         return $installed[0]['root'];
@@ -257,8 +247,7 @@  discard block
 block discarded – undo
257 247
      * @return array[]
258 248
      * @psalm-return array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}
259 249
      */
260
-    public static function getRawData()
261
-    {
250
+    public static function getRawData() {
262 251
         @trigger_error('getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.', E_USER_DEPRECATED);
263 252
 
264 253
         if (null === self::$installed) {
@@ -266,7 +255,8 @@  discard block
 block discarded – undo
266 255
             // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
267 256
             if (substr(__DIR__, -8, 1) !== 'C') {
268 257
                 self::$installed = include __DIR__ . '/installed.php';
269
-            } else {
258
+            }
259
+            else {
270 260
                 self::$installed = array();
271 261
             }
272 262
         }
@@ -280,8 +270,7 @@  discard block
 block discarded – undo
280 270
      * @return array[]
281 271
      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
282 272
      */
283
-    public static function getAllRawData()
284
-    {
273
+    public static function getAllRawData() {
285 274
         return self::getInstalled();
286 275
     }
287 276
 
@@ -303,8 +292,7 @@  discard block
 block discarded – undo
303 292
      *
304 293
      * @psalm-param array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>} $data
305 294
      */
306
-    public static function reload($data)
307
-    {
295
+    public static function reload($data) {
308 296
         self::$installed = $data;
309 297
         self::$installedByVendor = array();
310 298
     }
@@ -313,8 +301,7 @@  discard block
 block discarded – undo
313 301
      * @return array[]
314 302
      * @psalm-return list<array{root: array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}, versions: array<string, array{dev_requirement: bool, pretty_version?: string, version?: string, aliases?: string[], reference?: string, replaced?: string[], provided?: string[], install_path?: string, type?: string}>}>
315 303
      */
316
-    private static function getInstalled()
317
-    {
304
+    private static function getInstalled() {
318 305
         if (null === self::$canGetVendors) {
319 306
             self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
320 307
         }
@@ -325,7 +312,8 @@  discard block
 block discarded – undo
325 312
             foreach (ClassLoader::getRegisteredLoaders() as $vendorDir => $loader) {
326 313
                 if (isset(self::$installedByVendor[$vendorDir])) {
327 314
                     $installed[] = self::$installedByVendor[$vendorDir];
328
-                } elseif (is_file($vendorDir.'/composer/installed.php')) {
315
+                }
316
+                elseif (is_file($vendorDir.'/composer/installed.php')) {
329 317
                     $installed[] = self::$installedByVendor[$vendorDir] = require $vendorDir.'/composer/installed.php';
330 318
                     if (null === self::$installed && strtr($vendorDir.'/composer', '\\', '/') === strtr(__DIR__, '\\', '/')) {
331 319
                         self::$installed = $installed[count($installed) - 1];
@@ -339,7 +327,8 @@  discard block
 block discarded – undo
339 327
             // and not from its source location in the composer/composer package, see https://github.com/composer/composer/issues/9937
340 328
             if (substr(__DIR__, -8, 1) !== 'C') {
341 329
                 self::$installed = require __DIR__ . '/installed.php';
342
-            } else {
330
+            }
331
+            else {
343 332
                 self::$installed = array();
344 333
             }
345 334
         }
Please login to merge, or discard this patch.
vendor/composer/autoload_static.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -161,8 +161,7 @@
 block discarded – undo
161 161
         'WBXMLException' => __DIR__ . '/../..' . '/lib/exceptions/wbxmlexception.php',
162 162
     );
163 163
 
164
-    public static function getInitializer(ClassLoader $loader)
165
-    {
164
+    public static function getInitializer(ClassLoader $loader) {
166 165
         return \Closure::bind(function () use ($loader) {
167 166
             $loader->classMap = ComposerStaticInit153a56a781a72686b71399955d98204f::$classMap;
168 167
 
Please login to merge, or discard this patch.
vendor/composer/ClassLoader.php 1 patch
Braces   +46 added lines, -59 removed lines patch added patch discarded remove patch
@@ -103,8 +103,7 @@  discard block
 block discarded – undo
103 103
     /**
104 104
      * @param string|null $vendorDir
105 105
      */
106
-    public function __construct($vendorDir = null)
107
-    {
106
+    public function __construct($vendorDir = null) {
108 107
         $this->vendorDir = $vendorDir;
109 108
         self::initializeIncludeClosure();
110 109
     }
@@ -112,8 +111,7 @@  discard block
 block discarded – undo
112 111
     /**
113 112
      * @return array<string, list<string>>
114 113
      */
115
-    public function getPrefixes()
116
-    {
114
+    public function getPrefixes() {
117 115
         if (!empty($this->prefixesPsr0)) {
118 116
             return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
119 117
         }
@@ -124,32 +122,28 @@  discard block
 block discarded – undo
124 122
     /**
125 123
      * @return array<string, list<string>>
126 124
      */
127
-    public function getPrefixesPsr4()
128
-    {
125
+    public function getPrefixesPsr4() {
129 126
         return $this->prefixDirsPsr4;
130 127
     }
131 128
 
132 129
     /**
133 130
      * @return list<string>
134 131
      */
135
-    public function getFallbackDirs()
136
-    {
132
+    public function getFallbackDirs() {
137 133
         return $this->fallbackDirsPsr0;
138 134
     }
139 135
 
140 136
     /**
141 137
      * @return list<string>
142 138
      */
143
-    public function getFallbackDirsPsr4()
144
-    {
139
+    public function getFallbackDirsPsr4() {
145 140
         return $this->fallbackDirsPsr4;
146 141
     }
147 142
 
148 143
     /**
149 144
      * @return array<string, string> Array of classname => path
150 145
      */
151
-    public function getClassMap()
152
-    {
146
+    public function getClassMap() {
153 147
         return $this->classMap;
154 148
     }
155 149
 
@@ -158,11 +152,11 @@  discard block
 block discarded – undo
158 152
      *
159 153
      * @return void
160 154
      */
161
-    public function addClassMap(array $classMap)
162
-    {
155
+    public function addClassMap(array $classMap) {
163 156
         if ($this->classMap) {
164 157
             $this->classMap = array_merge($this->classMap, $classMap);
165
-        } else {
158
+        }
159
+        else {
166 160
             $this->classMap = $classMap;
167 161
         }
168 162
     }
@@ -177,8 +171,7 @@  discard block
 block discarded – undo
177 171
      *
178 172
      * @return void
179 173
      */
180
-    public function add($prefix, $paths, $prepend = false)
181
-    {
174
+    public function add($prefix, $paths, $prepend = false) {
182 175
         $paths = (array) $paths;
183 176
         if (!$prefix) {
184 177
             if ($prepend) {
@@ -186,7 +179,8 @@  discard block
 block discarded – undo
186 179
                     $paths,
187 180
                     $this->fallbackDirsPsr0
188 181
                 );
189
-            } else {
182
+            }
183
+            else {
190 184
                 $this->fallbackDirsPsr0 = array_merge(
191 185
                     $this->fallbackDirsPsr0,
192 186
                     $paths
@@ -207,7 +201,8 @@  discard block
 block discarded – undo
207 201
                 $paths,
208 202
                 $this->prefixesPsr0[$first][$prefix]
209 203
             );
210
-        } else {
204
+        }
205
+        else {
211 206
             $this->prefixesPsr0[$first][$prefix] = array_merge(
212 207
                 $this->prefixesPsr0[$first][$prefix],
213 208
                 $paths
@@ -227,8 +222,7 @@  discard block
 block discarded – undo
227 222
      *
228 223
      * @return void
229 224
      */
230
-    public function addPsr4($prefix, $paths, $prepend = false)
231
-    {
225
+    public function addPsr4($prefix, $paths, $prepend = false) {
232 226
         $paths = (array) $paths;
233 227
         if (!$prefix) {
234 228
             // Register directories for the root namespace.
@@ -237,13 +231,15 @@  discard block
 block discarded – undo
237 231
                     $paths,
238 232
                     $this->fallbackDirsPsr4
239 233
                 );
240
-            } else {
234
+            }
235
+            else {
241 236
                 $this->fallbackDirsPsr4 = array_merge(
242 237
                     $this->fallbackDirsPsr4,
243 238
                     $paths
244 239
                 );
245 240
             }
246
-        } elseif (!isset($this->prefixDirsPsr4[$prefix])) {
241
+        }
242
+        elseif (!isset($this->prefixDirsPsr4[$prefix])) {
247 243
             // Register directories for a new namespace.
248 244
             $length = strlen($prefix);
249 245
             if ('\\' !== $prefix[$length - 1]) {
@@ -251,13 +247,15 @@  discard block
 block discarded – undo
251 247
             }
252 248
             $this->prefixLengthsPsr4[$prefix[0]][$prefix] = $length;
253 249
             $this->prefixDirsPsr4[$prefix] = $paths;
254
-        } elseif ($prepend) {
250
+        }
251
+        elseif ($prepend) {
255 252
             // Prepend directories for an already registered namespace.
256 253
             $this->prefixDirsPsr4[$prefix] = array_merge(
257 254
                 $paths,
258 255
                 $this->prefixDirsPsr4[$prefix]
259 256
             );
260
-        } else {
257
+        }
258
+        else {
261 259
             // Append directories for an already registered namespace.
262 260
             $this->prefixDirsPsr4[$prefix] = array_merge(
263 261
                 $this->prefixDirsPsr4[$prefix],
@@ -275,11 +273,11 @@  discard block
 block discarded – undo
275 273
      *
276 274
      * @return void
277 275
      */
278
-    public function set($prefix, $paths)
279
-    {
276
+    public function set($prefix, $paths) {
280 277
         if (!$prefix) {
281 278
             $this->fallbackDirsPsr0 = (array) $paths;
282
-        } else {
279
+        }
280
+        else {
283 281
             $this->prefixesPsr0[$prefix[0]][$prefix] = (array) $paths;
284 282
         }
285 283
     }
@@ -295,11 +293,11 @@  discard block
 block discarded – undo
295 293
      *
296 294
      * @return void
297 295
      */
298
-    public function setPsr4($prefix, $paths)
299
-    {
296
+    public function setPsr4($prefix, $paths) {
300 297
         if (!$prefix) {
301 298
             $this->fallbackDirsPsr4 = (array) $paths;
302
-        } else {
299
+        }
300
+        else {
303 301
             $length = strlen($prefix);
304 302
             if ('\\' !== $prefix[$length - 1]) {
305 303
                 throw new \InvalidArgumentException("A non-empty PSR-4 prefix must end with a namespace separator.");
@@ -316,8 +314,7 @@  discard block
 block discarded – undo
316 314
      *
317 315
      * @return void
318 316
      */
319
-    public function setUseIncludePath($useIncludePath)
320
-    {
317
+    public function setUseIncludePath($useIncludePath) {
321 318
         $this->useIncludePath = $useIncludePath;
322 319
     }
323 320
 
@@ -327,8 +324,7 @@  discard block
 block discarded – undo
327 324
      *
328 325
      * @return bool
329 326
      */
330
-    public function getUseIncludePath()
331
-    {
327
+    public function getUseIncludePath() {
332 328
         return $this->useIncludePath;
333 329
     }
334 330
 
@@ -340,8 +336,7 @@  discard block
 block discarded – undo
340 336
      *
341 337
      * @return void
342 338
      */
343
-    public function setClassMapAuthoritative($classMapAuthoritative)
344
-    {
339
+    public function setClassMapAuthoritative($classMapAuthoritative) {
345 340
         $this->classMapAuthoritative = $classMapAuthoritative;
346 341
     }
347 342
 
@@ -350,8 +345,7 @@  discard block
 block discarded – undo
350 345
      *
351 346
      * @return bool
352 347
      */
353
-    public function isClassMapAuthoritative()
354
-    {
348
+    public function isClassMapAuthoritative() {
355 349
         return $this->classMapAuthoritative;
356 350
     }
357 351
 
@@ -362,8 +356,7 @@  discard block
 block discarded – undo
362 356
      *
363 357
      * @return void
364 358
      */
365
-    public function setApcuPrefix($apcuPrefix)
366
-    {
359
+    public function setApcuPrefix($apcuPrefix) {
367 360
         $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
368 361
     }
369 362
 
@@ -372,8 +365,7 @@  discard block
 block discarded – undo
372 365
      *
373 366
      * @return string|null
374 367
      */
375
-    public function getApcuPrefix()
376
-    {
368
+    public function getApcuPrefix() {
377 369
         return $this->apcuPrefix;
378 370
     }
379 371
 
@@ -384,8 +376,7 @@  discard block
 block discarded – undo
384 376
      *
385 377
      * @return void
386 378
      */
387
-    public function register($prepend = false)
388
-    {
379
+    public function register($prepend = false) {
389 380
         spl_autoload_register(array($this, 'loadClass'), true, $prepend);
390 381
 
391 382
         if (null === $this->vendorDir) {
@@ -394,7 +385,8 @@  discard block
 block discarded – undo
394 385
 
395 386
         if ($prepend) {
396 387
             self::$registeredLoaders = array($this->vendorDir => $this) + self::$registeredLoaders;
397
-        } else {
388
+        }
389
+        else {
398 390
             unset(self::$registeredLoaders[$this->vendorDir]);
399 391
             self::$registeredLoaders[$this->vendorDir] = $this;
400 392
         }
@@ -405,8 +397,7 @@  discard block
 block discarded – undo
405 397
      *
406 398
      * @return void
407 399
      */
408
-    public function unregister()
409
-    {
400
+    public function unregister() {
410 401
         spl_autoload_unregister(array($this, 'loadClass'));
411 402
 
412 403
         if (null !== $this->vendorDir) {
@@ -420,8 +411,7 @@  discard block
 block discarded – undo
420 411
      * @param  string    $class The name of the class
421 412
      * @return true|null True if loaded, null otherwise
422 413
      */
423
-    public function loadClass($class)
424
-    {
414
+    public function loadClass($class) {
425 415
         if ($file = $this->findFile($class)) {
426 416
             $includeFile = self::$includeFile;
427 417
             $includeFile($file);
@@ -439,8 +429,7 @@  discard block
 block discarded – undo
439 429
      *
440 430
      * @return string|false The path if found, false otherwise
441 431
      */
442
-    public function findFile($class)
443
-    {
432
+    public function findFile($class) {
444 433
         // class map lookup
445 434
         if (isset($this->classMap[$class])) {
446 435
             return $this->classMap[$class];
@@ -479,8 +468,7 @@  discard block
 block discarded – undo
479 468
      *
480 469
      * @return array<string, self>
481 470
      */
482
-    public static function getRegisteredLoaders()
483
-    {
471
+    public static function getRegisteredLoaders() {
484 472
         return self::$registeredLoaders;
485 473
     }
486 474
 
@@ -489,8 +477,7 @@  discard block
 block discarded – undo
489 477
      * @param  string       $ext
490 478
      * @return string|false
491 479
      */
492
-    private function findFileWithExtension($class, $ext)
493
-    {
480
+    private function findFileWithExtension($class, $ext) {
494 481
         // PSR-4 lookup
495 482
         $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
496 483
 
@@ -523,7 +510,8 @@  discard block
 block discarded – undo
523 510
             // namespaced class name
524 511
             $logicalPathPsr0 = substr($logicalPathPsr4, 0, $pos + 1)
525 512
                 . strtr(substr($logicalPathPsr4, $pos + 1), '_', DIRECTORY_SEPARATOR);
526
-        } else {
513
+        }
514
+        else {
527 515
             // PEAR-like class name
528 516
             $logicalPathPsr0 = strtr($class, '_', DIRECTORY_SEPARATOR) . $ext;
529 517
         }
@@ -558,8 +546,7 @@  discard block
 block discarded – undo
558 546
     /**
559 547
      * @return void
560 548
      */
561
-    private static function initializeIncludeClosure()
562
-    {
549
+    private static function initializeIncludeClosure() {
563 550
         if (self::$includeFile !== null) {
564 551
             return;
565 552
         }
Please login to merge, or discard this patch.
vendor/composer/autoload_real.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -6,8 +6,7 @@  discard block
 block discarded – undo
6 6
 {
7 7
     private static $loader;
8 8
 
9
-    public static function loadClassLoader($class)
10
-    {
9
+    public static function loadClassLoader($class) {
11 10
         if ('Composer\Autoload\ClassLoader' === $class) {
12 11
             require __DIR__ . '/ClassLoader.php';
13 12
         }
@@ -16,8 +15,7 @@  discard block
 block discarded – undo
16 15
     /**
17 16
      * @return \Composer\Autoload\ClassLoader
18 17
      */
19
-    public static function getLoader()
20
-    {
18
+    public static function getLoader() {
21 19
         if (null !== self::$loader) {
22 20
             return self::$loader;
23 21
         }
Please login to merge, or discard this patch.
vendor/autoload.php 1 patch
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,7 +10,8 @@
 block discarded – undo
10 10
     if (!ini_get('display_errors')) {
11 11
         if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') {
12 12
             fwrite(STDERR, $err);
13
-        } elseif (!headers_sent()) {
13
+        }
14
+        elseif (!headers_sent()) {
14 15
             echo $err;
15 16
         }
16 17
     }
Please login to merge, or discard this patch.