| Conditions | 2 |
| Paths | 1 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 6 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | public function __construct( |
||
| 21 | ReflectionClass $originalClass, |
||
| 22 | 1 | PropertyGenerator $initializerProperty, |
|
| 23 | MethodGenerator $callInitializer |
||
| 24 | ) { |
||
| 25 | parent::__construct($originalClass, '__clone'); |
||
| 26 | |||
| 27 | 1 | $this->setBody( |
|
| 28 | '$this->' . $initializerProperty->getName() . ' && $this->' . $callInitializer->getName() |
||
| 29 | 1 | . '(\'__clone\', []);' |
|
| 30 | 1 | . ($originalClass->hasMethod('__clone') ? "\n\nparent::__clone();" : '') |
|
| 31 | 1 | ); |
|
| 32 | 1 | } |
|
| 33 | } |
||
| 34 |