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