1 | <?php |
||
2 | |||
3 | declare(strict_types=1); |
||
4 | |||
5 | namespace LaravelFreelancerNL\Aranguent\Testing\Concerns; |
||
6 | |||
7 | use Illuminate\Support\Facades\DB; |
||
8 | |||
9 | trait InteractsWithDatabase |
||
10 | { |
||
11 | /** |
||
12 | * Cast a JSON string to a database compatible type. |
||
13 | * Supported for backwards compatibility in existing projects. |
||
14 | * No cast is necessary as json is a first class citizen in ArangoDB. |
||
15 | * |
||
16 | * @param array<mixed>|object|string $value |
||
17 | * @param string|null $connection |
||
18 | * @return \Illuminate\Contracts\Database\Query\Expression |
||
19 | * |
||
20 | * @SuppressWarnings("PHPMD.UnusedFormalParameter") |
||
21 | */ |
||
22 | 1 | public function castAsJson($value, $connection = null) |
|
0 ignored issues
–
show
|
|||
23 | { |
||
24 | 1 | return DB::raw($value); |
|
25 | } |
||
26 | } |
||
27 |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.