Failed Conditions
Pull Request — master (#34)
by Marc
03:16
created

AbstractOperation::getAll()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
ccs 2
cts 2
cp 1
cc 1
eloc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace TBolier\RethinkQL\Query\Operation;
5
6
use TBolier\RethinkQL\Query\Aggregation\AbstractAggregation;
7
use TBolier\RethinkQL\Query\QueryInterface;
8
9
abstract class AbstractOperation extends AbstractAggregation implements OperationInterface
10
{
11
    /**
12
     * @inheritdoc
13
     */
14 6
    public function count(): QueryInterface
15
    {
16 6
        return new Count($this->rethink, $this->message, $this);
17
    }
18
19
    /**
20
     * @inheritdoc
21
     */
22 2
    public function delete(): QueryInterface
23
    {
24 2
        return new Delete($this->rethink, $this->message, $this);
25
    }
26
27
    /**
28
     * @inheritdoc
29
     */
30 5
    public function filter(array $predicate): OperationInterface
31
    {
32 5
        return new Filter($this->rethink, $this->message, $this, $predicate);
33
    }
34
35
    /**
36
     * @inheritdoc
37
     */
38 1
    public function getAll(...$keys): OperationInterface
39
    {
40 1
        return new GetAll($this->rethink, $this->message, $this, $keys);
41
    }
42
43
    /**
44
     * @inheritdoc
45
     */
46 9
    public function update(array $elements): QueryInterface
47
    {
48 9
        return new Update($this->rethink, $this->message, $this, $elements);
49
    }
50
51
    /**
52
     * @inheritdoc
53
     */
54
    public function insert(array $document): QueryInterface
55
    {
56
        return new Insert($this->rethink, $this->message, $this, $document);
57
    }
58
}
59