Passed
Push — master ( 35eebd...7b8a1a )
by Roman
16:45
created

GameDto   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
eloc 10
dl 0
loc 26
ccs 0
cts 11
cp 0
rs 10
c 0
b 0
f 0
wmc 4

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A grid() 0 3 1
A size() 0 3 1
A definitions() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace App\Game\Features\GamePlay\Crossword;
6
7
/**
8
 * @psalm-immutable
9
 */
10
final class GameDto
11
{
12
    private int $size;
13
    private array $grid;
14
    private array $definitions;
15
16
    public function __construct(array $grid, int $size, array $definitions)
17
    {
18
        $this->grid = $grid;
19
        $this->size = $size;
20
        $this->definitions = $definitions;
21
    }
22
23
    public function grid(): array
24
    {
25
        return $this->grid;
26
    }
27
28
    public function size(): int
29
    {
30
        return $this->size;
31
    }
32
33
    public function definitions(): array
34
    {
35
        return $this->definitions;
36
    }
37
}
38