| Conditions | 2 |
| Paths | 2 |
| Total Lines | 9 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | public function getPlugins(array $params): array |
||
| 19 | { |
||
| 20 | $typeMethod = Str::studly($params['_type'] ?? 'default').'Plugins'; |
||
| 21 | |||
| 22 | if (method_exists($this, $typeMethod)) { |
||
| 23 | return $this->{$typeMethod}(); |
||
| 24 | } |
||
| 25 | |||
| 26 | throw new InvalidParamsException(Exception::SHORTCUT_MULTI_TYPE_ERROR, "Query type [$typeMethod] not supported"); |
||
| 27 | } |
||
| 43 |