@@ -39,8 +39,7 @@ discard block |
||
39 | 39 | return static::$default; |
40 | 40 | } |
41 | 41 | |
42 | - public static function setDefault |
|
43 | - ( |
|
42 | + public static function setDefault( |
|
44 | 43 | ReflectionCompositeProviderInterface $default |
45 | 44 | ) |
46 | 45 | { |
@@ -60,8 +59,7 @@ discard block |
||
60 | 59 | { |
61 | 60 | $this->cache[$classname] = |
62 | 61 | ( |
63 | - ReflectionCompositeFactory::fromClassName |
|
64 | - ( |
|
62 | + ReflectionCompositeFactory::fromClassName( |
|
65 | 63 | $classname |
66 | 64 | ) |
67 | 65 | ) |
@@ -29,8 +29,7 @@ |
||
29 | 29 | if ($offset === null) |
30 | 30 | { |
31 | 31 | $this->add($value); |
32 | - } |
|
33 | - else |
|
32 | + } else |
|
34 | 33 | { |
35 | 34 | $this->set($offset, $value); |
36 | 35 | } |
@@ -130,7 +130,7 @@ |
||
130 | 130 | * |
131 | 131 | * @param string $name |
132 | 132 | * @param bool $checkFile |
133 | - * @param string $singular |
|
133 | + * @param string $signular |
|
134 | 134 | */ |
135 | 135 | protected function addItems |
136 | 136 | ( |
@@ -14,7 +14,6 @@ |
||
14 | 14 | |
15 | 15 | namespace Spaark\CompositeUtils\Factory\Reflection; |
16 | 16 | |
17 | -use Spaark\CompositeUtils\Factory\BaseFactory; |
|
18 | 17 | use Spaark\CompositeUtils\Model\Reflection\ReflectionComposite; |
19 | 18 | use Spaark\CompositeUtils\Model\Reflection\ReflectionProperty; |
20 | 19 | use Spaark\CompositeUtils\Model\Reflection\ReflectionMethod; |
@@ -157,7 +157,7 @@ |
||
157 | 157 | else |
158 | 158 | { |
159 | 159 | $factory = |
160 | - '\Spaark\CompositeUtils\Factory\Reflection' |
|
160 | + '\Spaark\CompositeUtils\Factory\Reflection' |
|
161 | 161 | . '\Reflection' . $signular . 'Factory'; |
162 | 162 | $item = $this->{'build' . $signular} |
163 | 163 | ( |
@@ -70,8 +70,7 @@ discard block |
||
70 | 70 | * @param PHPNativeReflectionClass $reflect |
71 | 71 | * @param ReflectionCompositeProviderInterface $provider |
72 | 72 | */ |
73 | - public function __construct |
|
74 | - ( |
|
73 | + public function __construct( |
|
75 | 74 | PHPNativeReflectionClass $reflect, |
76 | 75 | ReflectionCompositeProviderInterface $provider |
77 | 76 | ) |
@@ -107,13 +106,11 @@ discard block |
||
107 | 106 | $file = (new ReflectionFileFactory($fileName))->build(); |
108 | 107 | $this->accessor->setRawValue('file', $file); |
109 | 108 | |
110 | - $this->accessor->setRawValue |
|
111 | - ( |
|
109 | + $this->accessor->setRawValue( |
|
112 | 110 | 'classname', |
113 | 111 | $this->reflector->name |
114 | 112 | ); |
115 | - $this->accessor->setRawValue |
|
116 | - ( |
|
113 | + $this->accessor->setRawValue( |
|
117 | 114 | 'namespace', |
118 | 115 | $file->namespaces[$this->reflector->getNamespaceName()] |
119 | 116 | ); |
@@ -132,8 +129,7 @@ discard block |
||
132 | 129 | * @param bool $checkFile |
133 | 130 | * @param string $singular |
134 | 131 | */ |
135 | - protected function addItems |
|
136 | - ( |
|
132 | + protected function addItems( |
|
137 | 133 | string $name, |
138 | 134 | bool $checkFile, |
139 | 135 | string $signular |
@@ -164,8 +160,7 @@ discard block |
||
164 | 160 | new $factory($item), |
165 | 161 | $item |
166 | 162 | ); |
167 | - $this->accessor->rawAddToValue |
|
168 | - ( |
|
163 | + $this->accessor->rawAddToValue( |
|
169 | 164 | 'local' . ucfirst($name), |
170 | 165 | $item |
171 | 166 | ); |
@@ -182,8 +177,7 @@ discard block |
||
182 | 177 | * @param PHPNativeReflectionClass $reflect |
183 | 178 | * @param string $method |
184 | 179 | */ |
185 | - protected function addInheritance |
|
186 | - ( |
|
180 | + protected function addInheritance( |
|
187 | 181 | string $group, |
188 | 182 | PHPNativeReflectionClass $reflect, |
189 | 183 | string $method = 'rawAddToValue' |
@@ -203,15 +197,13 @@ discard block |
||
203 | 197 | * @param ReflectionPropertyFactory $factory |
204 | 198 | * @return ReflectionProperty |
205 | 199 | */ |
206 | - protected function buildProperty |
|
207 | - ( |
|
200 | + protected function buildProperty( |
|
208 | 201 | ReflectionPropertyFactory $factory, |
209 | 202 | PHPNativeReflectionProperty $reflect |
210 | 203 | ) |
211 | 204 | : ReflectionProperty |
212 | 205 | { |
213 | - return $factory->build |
|
214 | - ( |
|
206 | + return $factory->build( |
|
215 | 207 | $this->object, |
216 | 208 | $this->reflector |
217 | 209 | ->getDefaultProperties()[$reflect->getName()] |