Test Failed
Pull Request — master (#69)
by Jérémy
02:57
created

ManipulationTrait   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 5
eloc 6
dl 0
loc 25
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A keys() 0 3 1
A pluck() 0 3 1
A hasFields() 0 3 1
A without() 0 3 1
A values() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace TBolier\RethinkQL\Query\Manipulation;
5
6
use TBolier\RethinkQL\Query\QueryInterface;
7
8
trait ManipulationTrait
9
{
10
    public function pluck(...$keys): QueryInterface
11
    {
12
        return new Pluck($this->rethink, /** @scrutinizer ignore-type */ $this, $keys);
13
    }
14
15
    public function without(...$keys)
16
    {
17
        return new Without($this->rethink, /** @scrutinizer ignore-type */ $this, $keys);
18
    }
19
20
    public function hasFields(...$keys)
21
    {
22
        return new HasFields($this->rethink, /** @scrutinizer ignore-type */ $this, $keys);
23
    }
24
25
    public function keys(): QueryInterface
26
    {
27
        return new Keys($this->rethink, /** @scrutinizer ignore-type */ $this);
28
    }
29
30
    public function values(): QueryInterface
31
    {
32
        return new Values($this->rethink, /** @scrutinizer ignore-type */ $this);
33
    }
34
}
35