| Conditions | 2 |
| Paths | 2 |
| Total Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | public function __construct( |
||
| 22 | ReflectionClass $originalClass, |
||
| 23 | 2 | PropertyGenerator $prefixInterceptors, |
|
| 24 | PropertyGenerator $suffixInterceptors |
||
| 25 | ) { |
||
| 26 | parent::__construct($originalClass, '__sleep'); |
||
| 27 | |||
| 28 | 2 | $parent = GetMethodIfExists::get($originalClass, '__sleep'); |
|
| 29 | |||
| 30 | 2 | $callParent = $parent ? '$returnValue = & parent::__sleep();' : '$returnValue = array_keys((array) $this);'; |
|
| 31 | |||
| 32 | 2 | $this->setBody(InterceptorGenerator::createInterceptedMethodBody( |
|
| 33 | $callParent, |
||
| 34 | 2 | $this, |
|
| 35 | 2 | $prefixInterceptors, |
|
| 36 | 2 | $suffixInterceptors, |
|
| 37 | 2 | $parent |
|
| 38 | 2 | )); |
|
| 39 | 2 | } |
|
| 40 | } |
||
| 41 |