@@ -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 | ( |
@@ -71,8 +71,7 @@ discard block |
||
| 71 | 71 | * @param PHPNativeReflectionClass $reflect |
| 72 | 72 | * @param ReflectionCompositeProviderInterface $provider |
| 73 | 73 | */ |
| 74 | - public function __construct |
|
| 75 | - ( |
|
| 74 | + public function __construct( |
|
| 76 | 75 | PHPNativeReflectionClass $reflect, |
| 77 | 76 | ReflectionCompositeProviderInterface $provider |
| 78 | 77 | ) |
@@ -110,13 +109,11 @@ discard block |
||
| 110 | 109 | $file = (new ReflectionFileFactory($fileName))->build(); |
| 111 | 110 | $this->accessor->setRawValue('file', $file); |
| 112 | 111 | |
| 113 | - $this->accessor->setRawValue |
|
| 114 | - ( |
|
| 112 | + $this->accessor->setRawValue( |
|
| 115 | 113 | 'classname', |
| 116 | 114 | $this->reflector->name |
| 117 | 115 | ); |
| 118 | - $this->accessor->setRawValue |
|
| 119 | - ( |
|
| 116 | + $this->accessor->setRawValue( |
|
| 120 | 117 | 'namespace', |
| 121 | 118 | $file->namespaces[$this->reflector->getNamespaceName()] |
| 122 | 119 | ); |
@@ -148,8 +145,7 @@ discard block |
||
| 148 | 145 | |
| 149 | 146 | protected function initFixedList(string $name, string $prefix = '') |
| 150 | 147 | { |
| 151 | - $this->accessor->setRawValue |
|
| 152 | - ( |
|
| 148 | + $this->accessor->setRawValue( |
|
| 153 | 149 | $prefix . $name, |
| 154 | 150 | new FixedList(count($this->reflector->{'get' . $name}())) |
| 155 | 151 | ); |
@@ -163,8 +159,7 @@ discard block |
||
| 163 | 159 | * @param bool $checkFile |
| 164 | 160 | * @param string $singular |
| 165 | 161 | */ |
| 166 | - protected function addItems |
|
| 167 | - ( |
|
| 162 | + protected function addItems( |
|
| 168 | 163 | string $name, |
| 169 | 164 | bool $checkFile, |
| 170 | 165 | string $signular |
@@ -195,8 +190,7 @@ discard block |
||
| 195 | 190 | new $factory($item), |
| 196 | 191 | $item |
| 197 | 192 | ); |
| 198 | - $this->accessor->rawAddToValue |
|
| 199 | - ( |
|
| 193 | + $this->accessor->rawAddToValue( |
|
| 200 | 194 | 'local' . ucfirst($name), |
| 201 | 195 | $item |
| 202 | 196 | ); |
@@ -213,8 +207,7 @@ discard block |
||
| 213 | 207 | * @param PHPNativeReflectionClass $reflect |
| 214 | 208 | * @param string $method |
| 215 | 209 | */ |
| 216 | - protected function addInheritance |
|
| 217 | - ( |
|
| 210 | + protected function addInheritance( |
|
| 218 | 211 | string $group, |
| 219 | 212 | PHPNativeReflectionClass $reflect, |
| 220 | 213 | string $method = 'rawAddToValue' |
@@ -234,15 +227,13 @@ discard block |
||
| 234 | 227 | * @param ReflectionPropertyFactory $factory |
| 235 | 228 | * @return ReflectionProperty |
| 236 | 229 | */ |
| 237 | - protected function buildProperty |
|
| 238 | - ( |
|
| 230 | + protected function buildProperty( |
|
| 239 | 231 | ReflectionPropertyFactory $factory, |
| 240 | 232 | PHPNativeReflectionProperty $reflect |
| 241 | 233 | ) |
| 242 | 234 | : ReflectionProperty |
| 243 | 235 | { |
| 244 | - return $factory->build |
|
| 245 | - ( |
|
| 236 | + return $factory->build( |
|
| 246 | 237 | $this->object, |
| 247 | 238 | $this->reflector |
| 248 | 239 | ->getDefaultProperties()[$reflect->getName()] |