@@ -56,7 +56,7 @@ |
||
56 | 56 | $this->loader->generate($this->dissector->typesToGenerate($class, 2)); |
57 | 57 | } catch (InvalidTypeArgument $exception) { |
58 | 58 | $this->log->info( |
59 | - 'Not generically auto loading: ' . $exception->getMessage() |
|
59 | + 'Not generically auto loading: '.$exception->getMessage() |
|
60 | 60 | ); |
61 | 61 | } |
62 | 62 | } |
@@ -53,8 +53,8 @@ |
||
53 | 53 | ); |
54 | 54 | } catch (ReflectionException $e) { |
55 | 55 | throw new LogicException( |
56 | - 'Somehow the php parser and reflection disagree. You must be ' . |
|
57 | - 'running insanely outdated software for this to ever happen. ' . |
|
56 | + 'Somehow the php parser and reflection disagree. You must be '. |
|
57 | + 'running insanely outdated software for this to ever happen. '. |
|
58 | 58 | $e->getMessage(), |
59 | 59 | $e->getCode(), |
60 | 60 | $e |
@@ -20,7 +20,7 @@ |
||
20 | 20 | $this->primitives = $primitives ?: new Primitives(); |
21 | 21 | } |
22 | 22 | |
23 | - public function for(string ...$types): TypeArguments |
|
23 | + public function for (string ...$types): TypeArguments |
|
24 | 24 | { |
25 | 25 | return new TypeArguments(...array_map([$this, 'argument'], $types)); |
26 | 26 | } |
@@ -57,7 +57,7 @@ |
||
57 | 57 | string $base, |
58 | 58 | TypeArguments $typeArguments |
59 | 59 | ): void { |
60 | - if (in_array($namespace . '\\' . $class, get_declared_classes())) { |
|
60 | + if (in_array($namespace.'\\'.$class, get_declared_classes())) { |
|
61 | 61 | return; |
62 | 62 | } |
63 | 63 | $this->writer->write($namespace, $class, $this->generator->generate( |
@@ -51,7 +51,7 @@ discard block |
||
51 | 51 | $this->dissect = $dissector; |
52 | 52 | } |
53 | 53 | |
54 | - public function for( |
|
54 | + public function for ( |
|
55 | 55 | string $namespace, |
56 | 56 | string $baseClass, |
57 | 57 | string $callingFile, |
@@ -90,15 +90,15 @@ discard block |
||
90 | 90 | continue; |
91 | 91 | } |
92 | 92 | if (!$this->primitives->includes($type) && !class_exists($type)) { |
93 | - throw TypeArgumentNotFound::for($type, $baseClass, count($typeArguments)); |
|
93 | + throw TypeArgumentNotFound::for ($type, $baseClass, count($typeArguments)); |
|
94 | 94 | } |
95 | 95 | $typeArguments[] = $type; |
96 | 96 | } |
97 | 97 | if (count($typeArguments) > $expectedCount) { |
98 | - throw UnexpectedTypeArgument::for($baseClass, count($typeArguments) - 1); |
|
98 | + throw UnexpectedTypeArgument::for ($baseClass, count($typeArguments) - 1); |
|
99 | 99 | } |
100 | 100 | if (count($typeArguments) < $expectedCount) { |
101 | - throw MissingTypeArgument::for($baseClass, count($typeArguments)); |
|
101 | + throw MissingTypeArgument::for ($baseClass, count($typeArguments)); |
|
102 | 102 | } |
103 | 103 | return $typeArguments; |
104 | 104 | } |
@@ -119,6 +119,6 @@ discard block |
||
119 | 119 | |
120 | 120 | private function shortNameOf(string $fqcn): string |
121 | 121 | { |
122 | - return substr(strrchr('\\' . $fqcn, '\\'), 1); |
|
122 | + return substr(strrchr('\\'.$fqcn, '\\'), 1); |
|
123 | 123 | } |
124 | 124 | } |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | final class TypeArgumentNotFound extends TypeError implements InvalidTypeArgument |
9 | 9 | { |
10 | - public static function for( |
|
10 | + public static function for ( |
|
11 | 11 | string $class, |
12 | 12 | string $genericBaseClass, |
13 | 13 | int $typeParameter |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | final class UnexpectedTypeArgument extends TypeError implements InvalidTypeArgument |
9 | 9 | { |
10 | - public static function for( |
|
10 | + public static function for ( |
|
11 | 11 | string $genericBaseClass, |
12 | 12 | int $typeParameter |
13 | 13 | ): InvalidTypeArgument { |
@@ -7,7 +7,7 @@ |
||
7 | 7 | |
8 | 8 | final class MissingTypeArgument extends TypeError implements InvalidTypeArgument |
9 | 9 | { |
10 | - public static function for( |
|
10 | + public static function for ( |
|
11 | 11 | string $genericBaseClass, |
12 | 12 | int $typeParameter |
13 | 13 | ): InvalidTypeArgument { |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | |
135 | 135 | private function shortName(string $fqcn): string |
136 | 136 | { |
137 | - return substr(strrchr('\\' . $fqcn, '\\'), 1); |
|
137 | + return substr(strrchr('\\'.$fqcn, '\\'), 1); |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | private function baseClass( |
@@ -151,11 +151,10 @@ discard block |
||
151 | 151 | string ...$types |
152 | 152 | ): array { |
153 | 153 | return array_map( |
154 | - function (string $argument) use ($detected, $caller): string { |
|
154 | + function(string $argument) use ($detected, $caller): string { |
|
155 | 155 | return $detected->imports()[$argument] ?? |
156 | 156 | ($this->primitives->includes($argument) ? |
157 | - $argument : |
|
158 | - sprintf('%s\\%s', $caller->namespace(), $argument) |
|
157 | + $argument : sprintf('%s\\%s', $caller->namespace(), $argument) |
|
159 | 158 | ); |
160 | 159 | }, |
161 | 160 | $types); |