Passed
Push — master ( 55cfd1...cb4d54 )
by Nico
22:41
created

AbstractData::getPosX()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Lib\Map\VisualPanel\Layer\Data;
6
7
use Doctrine\ORM\Mapping\Column;
8
use Doctrine\ORM\Mapping\Id;
9
use Doctrine\ORM\Mapping\MappedSuperclass;
10
11
#[MappedSuperclass]
12
class AbstractData implements CellDataInterface
13
{
14
    #[Id]
15
    #[Column(type: 'integer')]
16
    private int $x = 0;
17
18
    #[Id]
19
    #[Column(type: 'integer')]
20
    private int $y = 0;
21
22 7
    public function __construct(int $x, int $y)
23
    {
24 7
        $this->x = $x;
25 7
        $this->y = $y;
26
    }
27
28 5
    public function getPosX(): int
29
    {
30 5
        return $this->x;
31
    }
32
33 5
    public function getPosY(): int
34
    {
35 5
        return $this->y;
36
    }
37
}
38