Completed
Pull Request — master (#4)
by Peter
02:41 queued 32s
created

OffsetCriterion   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
c 0
b 0
f 0
lcom 1
cbo 0
dl 0
loc 22
ccs 7
cts 7
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A toArray() 0 4 1
A checkCollisionWithCriteria() 0 4 1
1
<?php
2
3
namespace PtrTn\Battlerite\Query\Matches;
4
5
use PtrTn\Battlerite\Query\CriterionInterface;
6
7
class OffsetCriterion implements CriterionInterface
8
{
9
    /**
10
     * @var int
11
     */
12
    private $offset;
13
14 2
    public function __construct(int $offset)
15
    {
16 2
        $this->offset = $offset;
17 2
    }
18
19 2
    public function toArray(): array
20
    {
21 2
        return ['page[offset]' => $this->offset];
22
    }
23
24 2
    public function checkCollisionWithCriteria(array $critera): void
25
    {
26 2
        return;
27
    }
28
}
29