Passed
Pull Request — master (#34)
by Marc
03:25
created

AbstractAggregation   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
dl 0
loc 24
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A limit() 0 3 1
A orderBy() 0 3 1
A skip() 0 3 1
1
<?php
2
declare(strict_types = 1);
3
4
namespace TBolier\RethinkQL\Query\Aggregation;
5
6
use TBolier\RethinkQL\Query\AbstractQuery;
7
8
abstract class AbstractAggregation extends AbstractQuery implements AggregationInterface
9
{
10
    /**
11
     * @inheritdoc
12
     */
13
    public function limit($value): AggregationInterface
14
    {
15
        return new Limit($this->rethink, $this->message, $this, $value);
16
    }
17
18
    /**
19
     * @inheritdoc
20
     */
21
    public function skip($value): AggregationInterface
22
    {
23
        return new Skip($this->rethink, $this->message, $this, $value);
24
    }
25
26
    /**
27
     * @inheritdoc
28
     */
29
    public function orderBy($key): AggregationInterface
30
    {
31
        return new OrderBy($this->rethink, $this->message, $this, $key);
32
    }
33
}
34