Passed
Pull Request — master (#18)
by Marc
03:37
created

DbList::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 7
ccs 5
cts 5
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 4
nc 1
nop 2
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace TBolier\RethinkQL\Query\Operation;
5
6
use TBolier\RethinkQL\Query\MessageInterface;
7
use TBolier\RethinkQL\RethinkInterface;
8
use TBolier\RethinkQL\Types\Term\TermType;
9
10
class DbList extends AbstractOperation
11
{
12
    /**
13
     * @param RethinkInterface $rethink
14
     * @param MessageInterface $message
15
     */
16 13
    public function __construct(RethinkInterface $rethink, MessageInterface $message)
17
    {
18 13
        parent::__construct($rethink, $message);
19
20 13
        $this->rethink = $rethink;
21 13
        $this->message = $message;
22 13
    }
23
24
    /**
25
     * @inheritdoc
26
     */
27 13
    public function toArray(): array
28
    {
29
        return [
30 13
            TermType::DB_LIST,
31
        ];
32
    }
33
}
34