Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
18 | public function __construct(ReflectionClass $originalClass, string $name, array $parameters = []) |
||
19 | 5 | { |
|
20 | parent::__construct( |
||
21 | 5 | $name, |
|
22 | 5 | $parameters, |
|
23 | 5 | self::FLAG_PUBLIC |
|
24 | 5 | ); |
|
25 | |||
26 | $this->setReturnsReference(strtolower($name) === '__get'); |
||
27 | 5 | ||
28 | if (! $originalClass->hasMethod($name)) { |
||
29 | 5 | return; |
|
30 | 2 | } |
|
31 | |||
32 | $this->setReturnsReference($originalClass->getMethod($name)->returnsReference()); |
||
33 | 3 | } |
|
34 | } |
||
35 |