Passed
Push — master ( b2bdac...3a7f22 )
by Ondřej
03:22
created

RelationDefinition::sort()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
rs 10
cc 1
eloc 2
nc 1
nop 2
1
<?php
2
namespace Ivory\Query;
3
4
abstract class RelationDefinition implements IRelationDefinition
5
{
6
    public function where($cond, ...$args): IRelationDefinition
7
    {
8
        return new ConstrainedRelationDefinition($this, $cond, ...$args);
9
    }
10
11
    public function sort($sortExpression, ...$args): IRelationDefinition
12
    {
13
        return new SortedRelationDefinition($this, $sortExpression, ...$args);
14
    }
15
16
    public function limit($limit, int $offset = 0): IRelationDefinition
17
    {
18
        return new LimitedRelationDefinition($this, $limit, $offset);
19
    }
20
}
21