Issues (364)

src/Testing/Concerns/InteractsWithDatabase.php (1 issue)

Severity
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
The parameter $connection is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

22
    public function castAsJson($value, /** @scrutinizer ignore-unused */ $connection = null)

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
23
    {
24 1
        return DB::raw($value);
25
    }
26
}
27