Location::getY()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
3
namespace Vehsamrak\Terraformator\Entity;
4
5
use Vehsamrak\Terraformator\Enum\Biom;
6
use Vehsamrak\Terraformator\Enum\LocationType;
7
8
/**
9
 * @author Vehsamrak
10
 */
11
class Location
12
{
13
14
    /** @var int */
15
    private $x;
16
    /** @var int */
17
    private $y;
18
    /** @var LocationType */
19
    private $type;
20
    /** @var Biom */
21
    private $biom;
22
23 4
    public function __construct(int $x, int $y, LocationType $type, Biom $biom)
24
    {
25 4
        $this->x = $x;
26 4
        $this->y = $y;
27 4
        $this->type = $type;
28 4
        $this->biom = $biom;
29 4
    }
30
31 2
    public function getBiom(): Biom
32
    {
33 2
        return $this->biom;
34
    }
35
36 2
    public function getX(): int
37
    {
38 2
        return $this->x;
39
    }
40
41 2
    public function getY(): int
42
    {
43 2
        return $this->y;
44
    }
45
}
46