Passed
Pull Request — master (#18)
by Timon
08:58
created

AbstractOperation::update()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
eloc 2
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\AbstractQuery;
7
8
abstract class AbstractOperation extends AbstractQuery
9
{
10
    /**
11
     * @inheritdoc
12
     */
13 5
    public function count(): AbstractOperation
14
    {
15 5
        return new Count($this->rethink, $this->message, $this);
16
    }
17
18
    /**
19
     * @inheritdoc
20
     */
21 2
    public function delete(): AbstractOperation
22
    {
23 2
        return new Delete($this->rethink, $this->message, $this);
24
    }
25
26
    /**
27
     * @inheritdoc
28
     */
29 1
    public function update(array $document): AbstractOperation
30
    {
31 1
        return new Update($this->rethink, $this->message, $this, $document);
32
    }
33
34
    /**
35
     * @inheritdoc
36
     */
37 8
    public function insert(array $document): AbstractOperation
38
    {
39 8
        return new Insert($this->rethink, $this->message, $this, $document);
40
    }
41
}
42