| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 8 | ||
| Bugs | 0 | Features | 5 |
| 1 | <?php |
||
| 16 | class QueryController extends Controller |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * Execute query |
||
| 20 | */ |
||
| 21 | public function exec(string $sessionKey, string $time, string $timeKey, Request $request): array |
||
|
|
|||
| 22 | { |
||
| 23 | $data = Cache::get($sessionKey); |
||
| 24 | |||
| 25 | if (isset($data[$time][$timeKey])) { |
||
| 26 | $query = $data[$time][$timeKey]; |
||
| 27 | return DB::connection()->select($query['rawSql'], (new BindingsMapper())->fromCache($query['bindings'])); |
||
| 28 | } |
||
| 29 | |||
| 30 | return []; |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Use explain for query |
||
| 35 | */ |
||
| 36 | public function explain(string $sessionKey, string $time, string $timeKey, Request $request): array |
||
| 48 | ]; |
||
| 49 | } |
||
| 51 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.