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

RelationDefinition   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
dl 0
loc 17
c 0
b 0
f 0
wmc 3
lcom 1
cbo 3
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A where() 0 4 1
A sort() 0 4 1
A limit() 0 4 1
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