Conditions | 3 |
Paths | 3 |
Total Lines | 15 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function getNewInstance(ReflectionClass $class): NewInstance |
||
27 | { |
||
28 | $setterMethods = new SetterMethods([]); |
||
29 | $methods = $class->getMethods(); |
||
30 | foreach ($methods as $method) { |
||
31 | if ($method->name === '__construct') { |
||
32 | continue; |
||
33 | } |
||
34 | |||
35 | $setterMethods->add($this->injectionMethod->getSetterMethod($method)); |
||
36 | } |
||
37 | |||
38 | $name = $this->injectionMethod->getConstructorName($class); |
||
39 | |||
40 | return new NewInstance($class, $setterMethods, $name); |
||
41 | } |
||
61 |