Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | private function hasCloneMethod(\ReflectionClass $reflection): bool |
||
36 | { |
||
37 | if (!$reflection->hasMethod('__clone')) { |
||
38 | return false; |
||
39 | } |
||
40 | |||
41 | try { |
||
42 | $cloneMethod = $reflection->getMethod('__clone'); |
||
43 | } catch (\ReflectionException $exception) { |
||
44 | return false; |
||
45 | } |
||
46 | |||
47 | return !$cloneMethod->isPrivate(); |
||
48 | } |
||
49 | } |