@@ -35,7 +35,7 @@ discard block |
||
35 | 35 | if ($tokens[$i][0] === \T_NAMESPACE) { |
36 | 36 | for ($j = $i + 1; $j < count($tokens); $j++) { |
37 | 37 | if ($tokens[$j][0] === T_STRING) { |
38 | - $namespace .= '\\' . $tokens[$j][1]; |
|
38 | + $namespace .= '\\'.$tokens[$j][1]; |
|
39 | 39 | } elseif ($tokens[$j] === '{' || $tokens[$j] === ';') { |
40 | 40 | break; |
41 | 41 | } |
@@ -59,6 +59,6 @@ discard block |
||
59 | 59 | |
60 | 60 | fclose($fp); |
61 | 61 | |
62 | - return ltrim($namespace . '\\' . $class, '\\'); |
|
62 | + return ltrim($namespace.'\\'.$class, '\\'); |
|
63 | 63 | } |
64 | 64 | } |
@@ -80,14 +80,14 @@ discard block |
||
80 | 80 | // |
81 | 81 | // TODO: realpath will return void if the path does not exist |
82 | 82 | // we should not depend on the file path existing. |
83 | - $pathPrefixes = array_map(function ($pathPrefix) { |
|
83 | + $pathPrefixes = array_map(function($pathPrefix) { |
|
84 | 84 | return Path::canonicalize($pathPrefix); |
85 | 85 | }, $pathPrefixes); |
86 | 86 | |
87 | 87 | foreach ($pathPrefixes as $pathPrefix) { |
88 | 88 | |
89 | 89 | if ((string) $filePath == $pathPrefix) { |
90 | - $candidates[] = [ $pathPrefix, $classPrefix ]; |
|
90 | + $candidates[] = [$pathPrefix, $classPrefix]; |
|
91 | 91 | continue; |
92 | 92 | } |
93 | 93 | |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | } |
104 | 104 | } |
105 | 105 | |
106 | - usort($candidates, function (array $leftCandidate, array $rightCandidate): int { |
|
106 | + usort($candidates, function(array $leftCandidate, array $rightCandidate): int { |
|
107 | 107 | return strlen($rightCandidate[0]) <=> strlen($leftCandidate[0]); |
108 | 108 | }); |
109 | 109 |
@@ -36,12 +36,12 @@ discard block |
||
36 | 36 | } |
37 | 37 | |
38 | 38 | // order with the longest prefixes first |
39 | - uksort($candidates, function ($prefix1, $prefix2) { |
|
39 | + uksort($candidates, function($prefix1, $prefix2) { |
|
40 | 40 | return strlen($prefix2) <=> strlen($prefix1); |
41 | 41 | }); |
42 | 42 | |
43 | 43 | // flatten to a single array |
44 | - $candidates = array_reduce($candidates, function ($candidates, $paths) { |
|
44 | + $candidates = array_reduce($candidates, function($candidates, $paths) { |
|
45 | 45 | return array_merge($candidates, $paths); |
46 | 46 | }, []); |
47 | 47 | |
@@ -112,7 +112,7 @@ discard block |
||
112 | 112 | } |
113 | 113 | |
114 | 114 | $paths = (array) $paths; |
115 | - $paths = array_map(function ($path) { |
|
115 | + $paths = array_map(function($path) { |
|
116 | 116 | if (!file_exists($path)) { |
117 | 117 | $this->logger->warning(sprintf( |
118 | 118 | 'Composer mapped path "%s" does not exist', |