Completed
Push — master ( bd03b7...2e6f46 )
by Ondřej
03:14
created

RelationRecipe   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A limit() 0 4 1
1
<?php
2
namespace Ivory\Query;
3
4
abstract class RelationRecipe implements IRelationRecipe
5
{
6
    /**
7
     * Creates this recipe limited only to certain number of rows, or starting from a certain row.
8
     *
9
     * @param int|null $limit the number of rows to limit this relation to; <tt>null</tt> means no limit
10
     * @param int $offset the number of leading rows to skip
11
     * @return IRelationRecipe recipe for relation containing at most <tt>$limit</tt> rows, skipping the first
12
     *                           <tt>$offset</tt> rows
13
     */
14
    public function limit($limit, int $offset = 0)
15
    {
16
        return new LimitedRelationRecipe($this, $limit, $offset);
17
    }
18
}
19