| @@ -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 | } | 
| @@ -37,12 +37,12 @@ discard block | ||
| 37 | 37 | } | 
| 38 | 38 | |
| 39 | 39 | // order with the longest prefixes first | 
| 40 | -        uksort($candidates, function ($prefix1, $prefix2) { | |
| 40 | +        uksort($candidates, function($prefix1, $prefix2) { | |
| 41 | 41 | return strlen($prefix2) <=> strlen($prefix1); | 
| 42 | 42 | }); | 
| 43 | 43 | |
| 44 | 44 | // flatten to a single array | 
| 45 | -        $candidates = array_reduce($candidates, function ($candidates, $paths) { | |
| 45 | +        $candidates = array_reduce($candidates, function($candidates, $paths) { | |
| 46 | 46 | return array_merge($candidates, $paths); | 
| 47 | 47 | }, []); | 
| 48 | 48 | |
| @@ -100,7 +100,7 @@ discard block | ||
| 100 | 100 | |
| 101 | 101 |          foreach ($prefixes as $prefix => $paths) { | 
| 102 | 102 | $paths = (array) $paths; | 
| 103 | -            $paths = array_map(function ($path) { | |
| 103 | +            $paths = array_map(function($path) { | |
| 104 | 104 |                  if (!file_exists($path)) { | 
| 105 | 105 | $this->logger->warning(sprintf( | 
| 106 | 106 | 'Composer mapped path "%s" does not exist', $path | 
| @@ -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 | |