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

Offset   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 1
dl 0
loc 27
ccs 6
cts 6
cp 1
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getOffset() 0 4 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 Offset
17
 */
18
class Offset extends Criterion
19
{
20
    /**
21
     * @var int
22
     */
23
    private $offset;
24
25
    /**
26
     * Offset constructor.
27
     * @param Query $query
28
     * @param int $offset
29
     */
30 2
    public function __construct(Query $query, int $offset)
31
    {
32 2
        parent::__construct($query);
33
34 2
        $this->offset = $offset;
35 2
    }
36
37
    /**
38
     * @return int
39
     */
40 2
    public function getOffset(): int
41
    {
42 2
        return $this->offset;
43
    }
44
}
45