Passed
Push — master ( b965a8...709c0d )
by Nico
49:45 queued 24:59
created

ShowSectionRequest::getCoordinate()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 0
Metric Value
cc 2
eloc 2
nc 2
nop 3
dl 0
loc 5
ccs 0
cts 3
cp 0
crap 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Module\Starmap\View\ShowSection;
6
7
use Stu\Lib\Request\CustomControllerHelperTrait;
8
9
final class ShowSectionRequest implements ShowSectionRequestInterface
10
{
11
    use CustomControllerHelperTrait;
12
13
    public function getLayerId(): int
14
    {
15
        return $this->queryParameter('layerid')->int()->required();
16
    }
17
18
    public function getSection(): int
19
    {
20
        return $this->queryParameter('section')->int()->required();
21
    }
22
23
    public function getDirection(): ?int
24
    {
25
        return $this->queryParameter('direction')->int()->defaultsTo(null);
26
    }
27
}
28