@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace Spaark\CompositeUtils\Factory\Reflection; |
4 | 4 | |
5 | -use Spaark\CompositeUtils\Factory\BaseFactory; |
|
6 | 5 | use Spaark\CompositeUtils\Model\Reflection\ReflectionFile; |
7 | 6 | use Spaark\CompositeUtils\Model\Reflection\NamespaceBlock; |
8 | 7 | use Spaark\CompositeUtils\Model\Reflection\UseStatement; |
@@ -60,8 +60,7 @@ discard block |
||
60 | 60 | case T_NAMESPACE: |
61 | 61 | $ns = new NamespaceBlock($classname); |
62 | 62 | $currentNS = new RawPropertyAccessor($ns); |
63 | - $this->accessor->rawAddToValue |
|
64 | - ( |
|
63 | + $this->accessor->rawAddToValue( |
|
65 | 64 | 'namespaces', |
66 | 65 | $ns |
67 | 66 | ); |
@@ -76,8 +75,7 @@ discard block |
||
76 | 75 | $as = end($as); |
77 | 76 | } |
78 | 77 | |
79 | - $currentNS->rawAddToValue |
|
80 | - ( |
|
78 | + $currentNS->rawAddToValue( |
|
81 | 79 | 'useStatements', |
82 | 80 | new UseStatement($classname, $as) |
83 | 81 | ); |
@@ -93,8 +93,7 @@ discard block |
||
93 | 93 | { |
94 | 94 | $as .= $token[1]; |
95 | 95 | } |
96 | - } |
|
97 | - elseif ($matching) |
|
96 | + } elseif ($matching) |
|
98 | 97 | { |
99 | 98 | switch ($token[0]) |
100 | 99 | { |
@@ -105,8 +104,7 @@ discard block |
||
105 | 104 | case T_AS: |
106 | 105 | $matching = T_AS; |
107 | 106 | } |
108 | - } |
|
109 | - else |
|
107 | + } else |
|
110 | 108 | { |
111 | 109 | switch ($token[0]) |
112 | 110 | { |
@@ -17,8 +17,7 @@ discard block |
||
17 | 17 | |
18 | 18 | public function build() |
19 | 19 | { |
20 | - $this->accessor->setRawValue |
|
21 | - ( |
|
20 | + $this->accessor->setRawValue( |
|
22 | 21 | 'file', |
23 | 22 | (new ReflectionFileFactory($this->reflector->getFileName())) |
24 | 23 | ->build() |
@@ -45,12 +44,10 @@ discard block |
||
45 | 44 | |
46 | 45 | protected function buildProperty($reflect) |
47 | 46 | { |
48 | - $this->accessor->rawAddToValue |
|
49 | - ( |
|
47 | + $this->accessor->rawAddToValue( |
|
50 | 48 | 'properties', |
51 | 49 | (new ReflectionPropertyFactory($reflect)) |
52 | - ->build |
|
53 | - ( |
|
50 | + ->build( |
|
54 | 51 | $this->object, |
55 | 52 | $this->reflector |
56 | 53 | ->getDefaultProperties()[$reflect->getName()] |
@@ -60,8 +57,7 @@ discard block |
||
60 | 57 | |
61 | 58 | protected function buildMethod($reflect) |
62 | 59 | { |
63 | - $this->accessor->rawAddToValue |
|
64 | - ( |
|
60 | + $this->accessor->rawAddToValue( |
|
65 | 61 | 'methods', |
66 | 62 | (new ReflectionMethodFactory($reflect)) |
67 | 63 | ->build($this->object) |