1 | <?php |
||
19 | class ReflectionUtils { |
||
20 | |||
21 | /** |
||
22 | * |
||
23 | * @param bool $publicOnly |
||
24 | */ |
||
25 | 1 | public static function getOverrideableMethods(\ReflectionClass $class, $publicOnly = false) { |
|
26 | 1 | $filter = \ReflectionMethod::IS_PUBLIC; |
|
27 | |||
28 | 1 | if (!$publicOnly) { |
|
29 | 1 | $filter |= \ReflectionMethod::IS_PROTECTED; |
|
30 | } |
||
31 | |||
32 | return array_filter($class->getMethods($filter), function ($method) { |
||
33 | 1 | return !$method->isFinal() && !$method->isStatic(); |
|
34 | 1 | }); |
|
35 | } |
||
36 | |||
37 | /** |
||
38 | * |
||
39 | * @param string $docComment |
||
40 | */ |
||
41 | 1 | public static function getUnindentedDocComment($docComment) { |
|
58 | |||
59 | /** |
||
60 | * |
||
61 | * @param \ReflectionFunctionAbstract $function |
||
62 | */ |
||
63 | 1 | public static function getFunctionBody(\ReflectionFunctionAbstract $function) { |
|
72 | |||
73 | } |
||
74 |