InMemoryDecks::deckFor()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 2
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
rs 10
c 2
b 0
f 1
1
<?php declare(strict_types=1);
2
3
namespace Stratadox\CardGame\Infrastructure\Test;
4
5
use Stratadox\CardGame\Account\AccountId;
6
use Stratadox\CardGame\Match\Deck;
7
use Stratadox\CardGame\Match\DeckForAccount;
8
9
final class InMemoryDecks implements DeckForAccount
10
{
11
    private $deckFor = [];
12
13
    public function deckFor(AccountId $account): Deck
14
    {
15
        return $this->deckFor[$account->id()] ?? new Deck();
16
    }
17
}
18