Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public static function findAll() |
||
36 | { |
||
37 | $reflection = new \ReflectionClass(static::class); |
||
38 | $methods = $reflection->getMethods(\ReflectionMethod::IS_STATIC); |
||
39 | $methods = ArrayHelper::map(array_filter($methods, function ($data) { |
||
40 | return StringHelper::startsWith($data->name, 'test'); |
||
41 | }), 'name', 'name'); |
||
42 | $data = []; |
||
43 | foreach ($methods as $method) { |
||
44 | if ($test = call_user_func(static::class . "::$method")) { |
||
45 | $data[] = $test; |
||
46 | } |
||
47 | } |
||
48 | return $data; |
||
49 | } |
||
68 | } |