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

VisualPanelRow   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 28
ccs 8
cts 8
cp 1
rs 10
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A addEntry() 0 3 1
A getEntries() 0 3 1
A getY() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Stu\Lib\Map\VisualPanel;
6
7
class VisualPanelRow
8
{
9
    private int $y;
10
11
    /** @var array<VisualPanelElementInterface>  */
12
    private array $entries;
13
14 1
    public function __construct(int $y)
15
    {
16 1
        $this->y = $y;
17
    }
18
19 1
    public function getY(): int
20
    {
21 1
        return $this->y;
22
    }
23
24 1
    public function addEntry(VisualPanelElementInterface $element): void
25
    {
26 1
        $this->entries[] = $element;
27
    }
28
29
    /**
30
     * @return array<VisualPanelElementInterface>
31
     */
32 1
    public function getEntries(): array
33
    {
34 1
        return $this->entries;
35
    }
36
}
37