Location   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 4
c 0
b 0
f 0
lcom 0
cbo 0
dl 0
loc 35
ccs 12
cts 12
cp 1
rs 10

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 7 1
A getBiom() 0 4 1
A getX() 0 4 1
A getY() 0 4 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