Completed
Pull Request — develop (#1687)
by
unknown
16:12
created
vendor/composer/ClassLoader.php 1 patch
Braces   +25 added lines, -50 removed lines patch added patch discarded remove patch
@@ -40,8 +40,7 @@  discard block
 block discarded – undo
40 40
  * @see    https://www.php-fig.org/psr/psr-0/
41 41
  * @see    https://www.php-fig.org/psr/psr-4/
42 42
  */
43
-class ClassLoader
44
-{
43
+class ClassLoader {
45 44
     /** @var ?string */
46 45
     private $vendorDir;
47 46
 
@@ -103,16 +102,14 @@  discard block
 block discarded – undo
103 102
     /**
104 103
      * @param ?string $vendorDir
105 104
      */
106
-    public function __construct($vendorDir = null)
107
-    {
105
+    public function __construct($vendorDir = null) {
108 106
         $this->vendorDir = $vendorDir;
109 107
     }
110 108
 
111 109
     /**
112 110
      * @return string[]
113 111
      */
114
-    public function getPrefixes()
115
-    {
112
+    public function getPrefixes() {
116 113
         if (!empty($this->prefixesPsr0)) {
117 114
             return call_user_func_array('array_merge', array_values($this->prefixesPsr0));
118 115
         }
@@ -124,8 +121,7 @@  discard block
 block discarded – undo
124 121
      * @return array[]
125 122
      * @psalm-return array<string, array<int, string>>
126 123
      */
127
-    public function getPrefixesPsr4()
128
-    {
124
+    public function getPrefixesPsr4() {
129 125
         return $this->prefixDirsPsr4;
130 126
     }
131 127
 
@@ -133,8 +129,7 @@  discard block
 block discarded – undo
133 129
      * @return array[]
134 130
      * @psalm-return array<string, string>
135 131
      */
136
-    public function getFallbackDirs()
137
-    {
132
+    public function getFallbackDirs() {
138 133
         return $this->fallbackDirsPsr0;
139 134
     }
140 135
 
@@ -142,8 +137,7 @@  discard block
 block discarded – undo
142 137
      * @return array[]
143 138
      * @psalm-return array<string, string>
144 139
      */
145
-    public function getFallbackDirsPsr4()
146
-    {
140
+    public function getFallbackDirsPsr4() {
147 141
         return $this->fallbackDirsPsr4;
148 142
     }
149 143
 
@@ -151,8 +145,7 @@  discard block
 block discarded – undo
151 145
      * @return string[] Array of classname => path
152 146
      * @psalm-return array<string, string>
153 147
      */
154
-    public function getClassMap()
155
-    {
148
+    public function getClassMap() {
156 149
         return $this->classMap;
157 150
     }
158 151
 
@@ -162,8 +155,7 @@  discard block
 block discarded – undo
162 155
      *
163 156
      * @return void
164 157
      */
165
-    public function addClassMap(array $classMap)
166
-    {
158
+    public function addClassMap(array $classMap) {
167 159
         if ($this->classMap) {
168 160
             $this->classMap = array_merge($this->classMap, $classMap);
169 161
         } else {
@@ -181,8 +173,7 @@  discard block
 block discarded – undo
181 173
      *
182 174
      * @return void
183 175
      */
184
-    public function add($prefix, $paths, $prepend = false)
185
-    {
176
+    public function add($prefix, $paths, $prepend = false) {
186 177
         if (!$prefix) {
187 178
             if ($prepend) {
188 179
                 $this->fallbackDirsPsr0 = array_merge(
@@ -230,8 +221,7 @@  discard block
 block discarded – undo
230 221
      *
231 222
      * @return void
232 223
      */
233
-    public function addPsr4($prefix, $paths, $prepend = false)
234
-    {
224
+    public function addPsr4($prefix, $paths, $prepend = false) {
235 225
         if (!$prefix) {
236 226
             // Register directories for the root namespace.
237 227
             if ($prepend) {
@@ -277,8 +267,7 @@  discard block
 block discarded – undo
277 267
      *
278 268
      * @return void
279 269
      */
280
-    public function set($prefix, $paths)
281
-    {
270
+    public function set($prefix, $paths) {
282 271
         if (!$prefix) {
283 272
             $this->fallbackDirsPsr0 = (array) $paths;
284 273
         } else {
@@ -297,8 +286,7 @@  discard block
 block discarded – undo
297 286
      *
298 287
      * @return void
299 288
      */
300
-    public function setPsr4($prefix, $paths)
301
-    {
289
+    public function setPsr4($prefix, $paths) {
302 290
         if (!$prefix) {
303 291
             $this->fallbackDirsPsr4 = (array) $paths;
304 292
         } else {
@@ -318,8 +306,7 @@  discard block
 block discarded – undo
318 306
      *
319 307
      * @return void
320 308
      */
321
-    public function setUseIncludePath($useIncludePath)
322
-    {
309
+    public function setUseIncludePath($useIncludePath) {
323 310
         $this->useIncludePath = $useIncludePath;
324 311
     }
325 312
 
@@ -329,8 +316,7 @@  discard block
 block discarded – undo
329 316
      *
330 317
      * @return bool
331 318
      */
332
-    public function getUseIncludePath()
333
-    {
319
+    public function getUseIncludePath() {
334 320
         return $this->useIncludePath;
335 321
     }
336 322
 
@@ -342,8 +328,7 @@  discard block
 block discarded – undo
342 328
      *
343 329
      * @return void
344 330
      */
345
-    public function setClassMapAuthoritative($classMapAuthoritative)
346
-    {
331
+    public function setClassMapAuthoritative($classMapAuthoritative) {
347 332
         $this->classMapAuthoritative = $classMapAuthoritative;
348 333
     }
349 334
 
@@ -352,8 +337,7 @@  discard block
 block discarded – undo
352 337
      *
353 338
      * @return bool
354 339
      */
355
-    public function isClassMapAuthoritative()
356
-    {
340
+    public function isClassMapAuthoritative() {
357 341
         return $this->classMapAuthoritative;
358 342
     }
359 343
 
@@ -364,8 +348,7 @@  discard block
 block discarded – undo
364 348
      *
365 349
      * @return void
366 350
      */
367
-    public function setApcuPrefix($apcuPrefix)
368
-    {
351
+    public function setApcuPrefix($apcuPrefix) {
369 352
         $this->apcuPrefix = function_exists('apcu_fetch') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN) ? $apcuPrefix : null;
370 353
     }
371 354
 
@@ -374,8 +357,7 @@  discard block
 block discarded – undo
374 357
      *
375 358
      * @return string|null
376 359
      */
377
-    public function getApcuPrefix()
378
-    {
360
+    public function getApcuPrefix() {
379 361
         return $this->apcuPrefix;
380 362
     }
381 363
 
@@ -386,8 +368,7 @@  discard block
 block discarded – undo
386 368
      *
387 369
      * @return void
388 370
      */
389
-    public function register($prepend = false)
390
-    {
371
+    public function register($prepend = false) {
391 372
         spl_autoload_register(array($this, 'loadClass'), true, $prepend);
392 373
 
393 374
         if (null === $this->vendorDir) {
@@ -407,8 +388,7 @@  discard block
 block discarded – undo
407 388
      *
408 389
      * @return void
409 390
      */
410
-    public function unregister()
411
-    {
391
+    public function unregister() {
412 392
         spl_autoload_unregister(array($this, 'loadClass'));
413 393
 
414 394
         if (null !== $this->vendorDir) {
@@ -422,8 +402,7 @@  discard block
 block discarded – undo
422 402
      * @param  string    $class The name of the class
423 403
      * @return true|null True if loaded, null otherwise
424 404
      */
425
-    public function loadClass($class)
426
-    {
405
+    public function loadClass($class) {
427 406
         if ($file = $this->findFile($class)) {
428 407
             includeFile($file);
429 408
 
@@ -440,8 +419,7 @@  discard block
 block discarded – undo
440 419
      *
441 420
      * @return string|false The path if found, false otherwise
442 421
      */
443
-    public function findFile($class)
444
-    {
422
+    public function findFile($class) {
445 423
         // class map lookup
446 424
         if (isset($this->classMap[$class])) {
447 425
             return $this->classMap[$class];
@@ -480,8 +458,7 @@  discard block
 block discarded – undo
480 458
      *
481 459
      * @return self[]
482 460
      */
483
-    public static function getRegisteredLoaders()
484
-    {
461
+    public static function getRegisteredLoaders() {
485 462
         return self::$registeredLoaders;
486 463
     }
487 464
 
@@ -490,8 +467,7 @@  discard block
 block discarded – undo
490 467
      * @param  string       $ext
491 468
      * @return string|false
492 469
      */
493
-    private function findFileWithExtension($class, $ext)
494
-    {
470
+    private function findFileWithExtension($class, $ext) {
495 471
         // PSR-4 lookup
496 472
         $logicalPathPsr4 = strtr($class, '\\', DIRECTORY_SEPARATOR) . $ext;
497 473
 
@@ -566,7 +542,6 @@  discard block
 block discarded – undo
566 542
  * @return void
567 543
  * @private
568 544
  */
569
-function includeFile($file)
570
-{
545
+function includeFile($file) {
571 546
     include $file;
572 547
 }
Please login to merge, or discard this patch.
vendor/composer/InstalledVersions.php 1 patch
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -22,8 +22,7 @@  discard block
 block discarded – undo
22 22
  *
23 23
  * To require its presence, you can require `composer-runtime-api ^2.0`
24 24
  */
25
-class InstalledVersions
26
-{
25
+class InstalledVersions {
27 26
     /**
28 27
      * @var mixed[]|null
29 28
      * @psalm-var 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}>}|array{}|null
@@ -47,8 +46,7 @@  discard block
 block discarded – undo
47 46
      * @return string[]
48 47
      * @psalm-return list<string>
49 48
      */
50
-    public static function getInstalledPackages()
51
-    {
49
+    public static function getInstalledPackages() {
52 50
         $packages = array();
53 51
         foreach (self::getInstalled() as $installed) {
54 52
             $packages[] = array_keys($installed['versions']);
@@ -68,8 +66,7 @@  discard block
 block discarded – undo
68 66
      * @return string[]
69 67
      * @psalm-return list<string>
70 68
      */
71
-    public static function getInstalledPackagesByType($type)
72
-    {
69
+    public static function getInstalledPackagesByType($type) {
73 70
         $packagesByType = array();
74 71
 
75 72
         foreach (self::getInstalled() as $installed) {
@@ -92,8 +89,7 @@  discard block
 block discarded – undo
92 89
      * @param  bool   $includeDevRequirements
93 90
      * @return bool
94 91
      */
95
-    public static function isInstalled($packageName, $includeDevRequirements = true)
96
-    {
92
+    public static function isInstalled($packageName, $includeDevRequirements = true) {
97 93
         foreach (self::getInstalled() as $installed) {
98 94
             if (isset($installed['versions'][$packageName])) {
99 95
                 return $includeDevRequirements || empty($installed['versions'][$packageName]['dev_requirement']);
@@ -115,8 +111,7 @@  discard block
 block discarded – undo
115 111
      * @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 112
      * @return bool
117 113
      */
118
-    public static function satisfies(VersionParser $parser, $packageName, $constraint)
119
-    {
114
+    public static function satisfies(VersionParser $parser, $packageName, $constraint) {
120 115
         $constraint = $parser->parseConstraints($constraint);
121 116
         $provided = $parser->parseConstraints(self::getVersionRanges($packageName));
122 117
 
@@ -132,8 +127,7 @@  discard block
 block discarded – undo
132 127
      * @param  string $packageName
133 128
      * @return string Version constraint usable with composer/semver
134 129
      */
135
-    public static function getVersionRanges($packageName)
136
-    {
130
+    public static function getVersionRanges($packageName) {
137 131
         foreach (self::getInstalled() as $installed) {
138 132
             if (!isset($installed['versions'][$packageName])) {
139 133
                 continue;
@@ -163,8 +157,7 @@  discard block
 block discarded – undo
163 157
      * @param  string      $packageName
164 158
      * @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 159
      */
166
-    public static function getVersion($packageName)
167
-    {
160
+    public static function getVersion($packageName) {
168 161
         foreach (self::getInstalled() as $installed) {
169 162
             if (!isset($installed['versions'][$packageName])) {
170 163
                 continue;
@@ -184,8 +177,7 @@  discard block
 block discarded – undo
184 177
      * @param  string      $packageName
185 178
      * @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 179
      */
187
-    public static function getPrettyVersion($packageName)
188
-    {
180
+    public static function getPrettyVersion($packageName) {
189 181
         foreach (self::getInstalled() as $installed) {
190 182
             if (!isset($installed['versions'][$packageName])) {
191 183
                 continue;
@@ -205,8 +197,7 @@  discard block
 block discarded – undo
205 197
      * @param  string      $packageName
206 198
      * @return string|null If the package is being replaced or provided but is not really installed, null will be returned as reference
207 199
      */
208
-    public static function getReference($packageName)
209
-    {
200
+    public static function getReference($packageName) {
210 201
         foreach (self::getInstalled() as $installed) {
211 202
             if (!isset($installed['versions'][$packageName])) {
212 203
                 continue;
@@ -226,8 +217,7 @@  discard block
 block discarded – undo
226 217
      * @param  string      $packageName
227 218
      * @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 219
      */
229
-    public static function getInstallPath($packageName)
230
-    {
220
+    public static function getInstallPath($packageName) {
231 221
         foreach (self::getInstalled() as $installed) {
232 222
             if (!isset($installed['versions'][$packageName])) {
233 223
                 continue;
@@ -243,8 +233,7 @@  discard block
 block discarded – undo
243 233
      * @return array
244 234
      * @psalm-return array{name: string, version: string, reference: string, pretty_version: string, aliases: string[], dev: bool, install_path: string, type: string}
245 235
      */
246
-    public static function getRootPackage()
247
-    {
236
+    public static function getRootPackage() {
248 237
         $installed = self::getInstalled();
249 238
 
250 239
         return $installed[0]['root'];
@@ -257,8 +246,7 @@  discard block
 block discarded – undo
257 246
      * @return array[]
258 247
      * @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 248
      */
260
-    public static function getRawData()
261
-    {
249
+    public static function getRawData() {
262 250
         @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 251
 
264 252
         if (null === self::$installed) {
@@ -280,8 +268,7 @@  discard block
 block discarded – undo
280 268
      * @return array[]
281 269
      * @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 270
      */
283
-    public static function getAllRawData()
284
-    {
271
+    public static function getAllRawData() {
285 272
         return self::getInstalled();
286 273
     }
287 274
 
@@ -303,8 +290,7 @@  discard block
 block discarded – undo
303 290
      *
304 291
      * @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 292
      */
306
-    public static function reload($data)
307
-    {
293
+    public static function reload($data) {
308 294
         self::$installed = $data;
309 295
         self::$installedByVendor = array();
310 296
     }
@@ -313,8 +299,7 @@  discard block
 block discarded – undo
313 299
      * @return array[]
314 300
      * @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 301
      */
316
-    private static function getInstalled()
317
-    {
302
+    private static function getInstalled() {
318 303
         if (null === self::$canGetVendors) {
319 304
             self::$canGetVendors = method_exists('Composer\Autoload\ClassLoader', 'getRegisteredLoaders');
320 305
         }
Please login to merge, or discard this patch.
vendor/composer/autoload_real.php 1 patch
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -2,12 +2,10 @@  discard block
 block discarded – undo
2 2
 
3 3
 // autoload_real.php @generated by Composer
4 4
 
5
-class ComposerAutoloaderInit984ed95bef2b0e3d4eeb0208a88dc67d
6
-{
5
+class ComposerAutoloaderInit984ed95bef2b0e3d4eeb0208a88dc67d {
7 6
     private static $loader;
8 7
 
9
-    public static function loadClassLoader($class)
10
-    {
8
+    public static function loadClassLoader($class) {
11 9
         if ('Composer\Autoload\ClassLoader' === $class) {
12 10
             require __DIR__ . '/ClassLoader.php';
13 11
         }
@@ -16,8 +14,7 @@  discard block
 block discarded – undo
16 14
     /**
17 15
      * @return \Composer\Autoload\ClassLoader
18 16
      */
19
-    public static function getLoader()
20
-    {
17
+    public static function getLoader() {
21 18
         if (null !== self::$loader) {
22 19
             return self::$loader;
23 20
         }
@@ -70,8 +67,7 @@  discard block
 block discarded – undo
70 67
  * @param string $file
71 68
  * @return void
72 69
  */
73
-function composerRequire984ed95bef2b0e3d4eeb0208a88dc67d($fileIdentifier, $file)
74
-{
70
+function composerRequire984ed95bef2b0e3d4eeb0208a88dc67d($fileIdentifier, $file) {
75 71
     if (empty($GLOBALS['__composer_autoload_files'][$fileIdentifier])) {
76 72
         $GLOBALS['__composer_autoload_files'][$fileIdentifier] = true;
77 73
 
Please login to merge, or discard this patch.