Passed
Push — master ( 0692f7...99bddd )
by Petr
09:18
created

Location   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 100%

Importance

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

2 Methods

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