Passed
Push — master ( 4e3abd...c23c95 )
by Jesse
02:09
created

EndCardPlaying::player()   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\Command;
6
use Stratadox\CardGame\CorrelationId;
7
use Stratadox\CardGame\Match\MatchId;
8
9
final class EndCardPlaying implements Command
10
{
11
    /** @var int */
12
    private $player;
13
    /** @var MatchId */
14
    private $match;
15
    /** @var CorrelationId */
16
    private $correlationId;
17
18
    private function __construct(
19
        int $player,
20
        MatchId $match,
21
        CorrelationId $correlationId
0 ignored issues
show
Unused Code introduced by
The parameter $correlationId is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

21
        /** @scrutinizer ignore-unused */ CorrelationId $correlationId

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
22
    ) {
23
        $this->player = $player;
24
        $this->match = $match;
25
    }
26
27
    public static function phase(
28
        int $player,
29
        MatchId $match,
30
        CorrelationId $correlationId
31
    ): self {
32
        return new self($player, $match, $correlationId);
33
    }
34
35
    public function player(): int
36
    {
37
        return $this->player;
38
    }
39
40
    public function match(): MatchId
41
    {
42
        return $this->match;
43
    }
44
45
    public function correlationId(): CorrelationId
46
    {
47
        return $this->correlationId;
48
    }
49
}
50