@@ -99,7 +99,7 @@ |
||
99 | 99 | self::initClassMap(); |
100 | 100 | if (false === self::$optimisedClassMap && !class_exists(ClassMapGenerator::class)) { |
101 | 101 | throw new Exception('Cruxinator/ClassFinder requires either composer/composer' . |
102 | - ' or an optimised autoloader(`composer dump-autoload -o`)'); |
|
102 | + ' or an optimised autoloader(`composer dump-autoload -o`)'); |
|
103 | 103 | } |
104 | 104 | } |
105 | 105 |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | $map = self::getClassMap($namespace); |
45 | 45 | // before we process the class list to autoload the resident classes, filter out the ones outside |
46 | 46 | // desired namespace |
47 | - $map = array_filter($map, function (string $value, string $key) use ($namespace) { |
|
47 | + $map = array_filter($map, function(string $value, string $key) use ($namespace) { |
|
48 | 48 | return self::strStartsWith($namespace, $value) || |
49 | 49 | self::strStartsWith($namespace, $key); |
50 | 50 | }, ARRAY_FILTER_USE_BOTH); |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | self::checkState(); |
70 | 70 | if (self::$optimisedClassMap !== false) { |
71 | 71 | assert(!is_bool(self::$optimisedClassMap)); |
72 | - return self::$optimisedClassMap ; |
|
72 | + return self::$optimisedClassMap; |
|
73 | 73 | } |
74 | 74 | $projectDirs = self::getProjectSearchDirs($namespace); |
75 | 75 | $map = []; |
@@ -148,10 +148,10 @@ discard block |
||
148 | 148 | */ |
149 | 149 | public static function getClasses(string $namespace = '', callable $conditional = null, bool $includeVendor = true):array |
150 | 150 | { |
151 | - $conditional = $conditional ?: function () { |
|
151 | + $conditional = $conditional ?: function() { |
|
152 | 152 | return true; |
153 | 153 | }; |
154 | - $classes = array_values(array_filter(self::getProjectClasses($namespace), function (string $class) use ( |
|
154 | + $classes = array_values(array_filter(self::getProjectClasses($namespace), function(string $class) use ( |
|
155 | 155 | $namespace, |
156 | 156 | $conditional, |
157 | 157 | $includeVendor |
@@ -161,7 +161,7 @@ discard block |
||
161 | 161 | $dontSkip = !self::isClassInVendor($class); |
162 | 162 | }*/ |
163 | 163 | $dontSkip = $includeVendor || !self::isClassInVendor($class); |
164 | - return substr($class, 0, strlen($namespace)) === $namespace && $dontSkip && $conditional($class) ; |
|
164 | + return substr($class, 0, strlen($namespace)) === $namespace && $dontSkip && $conditional($class); |
|
165 | 165 | })); |
166 | 166 | |
167 | 167 | return $classes; |