@@ -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\Service\ReflectionCompositeProviderInterface; |
| 20 | 19 | use Spaark\CompositeUtils\Service\ReflectionCompositeProvider; |
@@ -61,8 +61,7 @@ discard block |
||
| 61 | 61 | ); |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | - public function __construct |
|
| 65 | - ( |
|
| 64 | + public function __construct( |
|
| 66 | 65 | PHPNativeReflectionClass $reflect, |
| 67 | 66 | ReflectionCompositeProviderInterface $provider |
| 68 | 67 | ) |
@@ -82,13 +81,11 @@ discard block |
||
| 82 | 81 | (new ReflectionFileFactory($this->reflector->getFileName())) |
| 83 | 82 | ->build(); |
| 84 | 83 | $this->accessor->setRawValue('file', $file); |
| 85 | - $this->accessor->setRawValue |
|
| 86 | - ( |
|
| 84 | + $this->accessor->setRawValue( |
|
| 87 | 85 | 'classname', |
| 88 | 86 | $this->reflector->name |
| 89 | 87 | ); |
| 90 | - $this->accessor->setRawValue |
|
| 91 | - ( |
|
| 88 | + $this->accessor->setRawValue( |
|
| 92 | 89 | 'namespace', |
| 93 | 90 | $file->namespaces[$this->reflector->getNamespaceName()] |
| 94 | 91 | ); |
@@ -118,8 +115,7 @@ discard block |
||
| 118 | 115 | * |
| 119 | 116 | * @param PHPNativeReflectionProperty |
| 120 | 117 | */ |
| 121 | - protected function buildProperty |
|
| 122 | - ( |
|
| 118 | + protected function buildProperty( |
|
| 123 | 119 | PHPNativeReflectionProperty $reflect |
| 124 | 120 | ) |
| 125 | 121 | { |
@@ -127,8 +123,7 @@ discard block |
||
| 127 | 123 | |
| 128 | 124 | $properties[$reflect->getName()] = |
| 129 | 125 | (new ReflectionPropertyFactory($reflect)) |
| 130 | - ->build |
|
| 131 | - ( |
|
| 126 | + ->build( |
|
| 132 | 127 | $this->object, |
| 133 | 128 | $this->reflector |
| 134 | 129 | ->getDefaultProperties()[$reflect->getName()] |
@@ -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 | } |