Completed
Push — master ( 4b1e3c...30d3d2 )
by Jesse
02:57
created

AttackWithCard::match()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 0
b 0
f 0
1
<?php declare(strict_types=1);
2
3
namespace Stratadox\CardGame\Match\Command;
4
5
use Stratadox\CardGame\Match\MatchId;
6
7
final class AttackWithCard
8
{
9
    /** @var int */
10
    private $offset;
11
    /** @var int */
12
    private $player;
13
    /** @var MatchId */
14
    private $match;
15
16
    public function __construct(int $offset, int $player, MatchId $match)
17
    {
18
        $this->offset = $offset;
19
        $this->player = $player;
20
        $this->match = $match;
21
    }
22
23
    public static function number(int $offset, int $player, MatchId $match): self
24
    {
25
        return new self($offset, $player, $match);
26
    }
27
28
    public function cardNumber(): int
29
    {
30
        return $this->offset;
31
    }
32
33
    public function player(): int
34
    {
35
        return $this->player;
36
    }
37
38
    public function match(): MatchId
39
    {
40
        return $this->match;
41
    }
42
}
43