InMemoryDecks   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 7
Duplicated Lines 0 %

Importance

Changes 3
Bugs 0 Features 1
Metric Value
eloc 3
dl 0
loc 7
rs 10
c 3
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A deckFor() 0 3 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