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