| Conditions | 2 |
| Paths | 2 |
| Total Lines | 29 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 2 |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function __construct( |
||
| 25 | ReflectionClass $originalClass, |
||
| 26 | PropertyGenerator $prefixInterceptors, |
||
| 27 | 2 | PropertyGenerator $suffixInterceptors |
|
| 28 | ) { |
||
| 29 | parent::__construct($originalClass, '__unset', [new ParameterGenerator('name')]); |
||
| 30 | |||
| 31 | $parent = GetMethodIfExists::get($originalClass, '__unset'); |
||
| 32 | 2 | ||
| 33 | $callParent = '$returnValue = & parent::__unset($name);'; |
||
| 34 | 2 | ||
| 35 | if (! $parent) { |
||
| 36 | 2 | $callParent = PublicScopeSimulator::getPublicAccessSimulationCode( |
|
| 37 | PublicScopeSimulator::OPERATION_UNSET, |
||
| 38 | 2 | 'name', |
|
| 39 | 1 | null, |
|
| 40 | 1 | null, |
|
| 41 | 1 | 'returnValue' |
|
| 42 | 1 | ); |
|
| 43 | 1 | } |
|
| 44 | 1 | ||
| 45 | $this->setBody(InterceptorGenerator::createInterceptedMethodBody( |
||
| 46 | $callParent, |
||
| 47 | $this, |
||
| 48 | 2 | $prefixInterceptors, |
|
| 49 | 2 | $suffixInterceptors, |
|
| 50 | 2 | $parent |
|
| 51 | 2 | )); |
|
| 52 | 2 | } |
|
| 53 | } |
||
| 54 |