Completed
Push — master ( b7ef6a...58a002 )
by Kirill
03:12
created

Limit::getLimit()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
/**
3
 * This file is part of Hydrogen package.
4
 *
5
 * For the full copyright and license information, please view the LICENSE
6
 * file that was distributed with this source code.
7
 */
8
declare(strict_types=1);
9
10
namespace RDS\Hydrogen\Criteria;
11
12
use RDS\Hydrogen\Criteria\Common\Field;
13
use RDS\Hydrogen\Query;
14
15
/**
16
 * Class Limit
17
 */
18
class Limit extends Criterion
19
{
20
    /**
21
     * @var int
22
     */
23
    private $limit;
24
25
    /**
26
     * Limit constructor.
27
     * @param Query $query
28
     * @param int $limit
29
     */
30 4
    public function __construct(Query $query, int $limit)
31
    {
32 4
        parent::__construct($query);
33
34 4
        $this->limit = $limit;
35 4
    }
36
37
    /**
38
     * @return int
39
     */
40 4
    public function getLimit(): int
41
    {
42 4
        return $this->limit;
43
    }
44
}
45