1 | <?php |
||
8 | final class Methods |
||
9 | { |
||
10 | private const MAGIC_METHOD_NAMES = [ |
||
11 | '__construct', |
||
12 | '__destruct', |
||
13 | '__call', |
||
14 | '__callstatic', |
||
15 | '__get', |
||
16 | '__set', |
||
17 | '__isset', |
||
18 | '__unset', |
||
19 | '__sleep', |
||
20 | '__wakeup', |
||
21 | '__toString', |
||
22 | '__invoke', |
||
23 | '__set_state', |
||
24 | '__clone', |
||
25 | '__debuginfo', |
||
26 | ]; |
||
27 | |||
28 | public function getMethods(\ReflectionClass $reflection): array |
||
45 | |||
46 | private function isIgnoredMethod(\ReflectionMethod $method): bool |
||
50 | |||
51 | private function isMagicMethod(string $name): bool |
||
55 | |||
56 | private function makeNodeFlags(\ReflectionMethod $method): int |
||
69 | |||
70 | private function makeReturnType(\ReflectionMethod $method): ?Node |
||
94 | } |