Issues (57)

src/Query/Manipulation/Values.php (1 issue)

Severity
1
<?php
2
declare(strict_types = 1);
3
4
namespace TBolier\RethinkQL\Query\Manipulation;
5
6
use TBolier\RethinkQL\Query\AbstractQuery;
7
use TBolier\RethinkQL\Query\Aggregation\AggregationTrait;
8
use TBolier\RethinkQL\Query\Operation\OperationTrait;
9
use TBolier\RethinkQL\Query\QueryInterface;
10
use TBolier\RethinkQL\Query\Transformation\TransformationTrait;
11
use TBolier\RethinkQL\RethinkInterface;
12
use TBolier\RethinkQL\Types\Term\TermType;
13
14
class Values extends AbstractQuery
15
{
16
    use AggregationTrait;
17
    use OperationTrait;
18
    use TransformationTrait;
19
20
    /**
21
     * @var array
22
     */
23
    private $keys;
0 ignored issues
show
The private property $keys is not used, and could be removed.
Loading history...
24
25
    /**
26
     * @var QueryInterface
27
     */
28
    private $query;
29
30
    public function __construct(
31
        RethinkInterface $rethink,
32
        QueryInterface $query
33
    ) {
34
        parent::__construct($rethink);
35
36
        $this->query   = $query;
37
        $this->rethink = $rethink;
38
    }
39
40
    public function toArray(): array
41
    {
42
        return [
43
            TermType::VALUES,
44
            [
45
                $this->query->toArray()
46
            ],
47
        ];
48
    }
49
}
50