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

AbstractData   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 12
c 1
b 0
f 0
dl 0
loc 25
ccs 7
cts 7
cp 1
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPosY() 0 3 1
A getPosX() 0 3 1
A __construct() 0 4 1
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