| Conditions | 1 |
| Paths | 1 |
| Total Lines | 17 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 1 |
| Changes | 0 | ||
| 1 | <?php |
||
| 19 | public function __construct( |
||
| 20 | ReflectionClass $originalClass, |
||
| 21 | 1 | PropertyGenerator $initializerProperty, |
|
| 22 | PropertyGenerator $valueHolderProperty |
||
| 23 | ) { |
||
| 24 | parent::__construct($originalClass, '__clone'); |
||
| 25 | |||
| 26 | 1 | $initializer = $initializerProperty->getName(); |
|
| 27 | $valueHolder = $valueHolderProperty->getName(); |
||
| 28 | 1 | ||
| 29 | 1 | $this->setBody( |
|
| 30 | '$this->' . $initializer . ' && $this->' . $initializer |
||
| 31 | 1 | . '->__invoke($this->' . $valueHolder |
|
| 32 | 1 | . ', $this, \'__clone\', array(), $this->' . $initializer . ');' . "\n\n" |
|
| 33 | 1 | . '$this->' . $valueHolder . ' = clone $this->' . $valueHolder . ';' |
|
| 34 | 1 | ); |
|
| 35 | 1 | } |
|
| 36 | } |
||
| 37 |