PassInfoTrait   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 16
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 5
c 1
b 0
f 1
dl 0
loc 16
rs 10
ccs 3
cts 3
cp 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A passInfo() 0 4 1
1
<?php
2
3
namespace App\Game;
4
5
use App\Card\Card;
6
7
/**
8
 * Trait for implementing the action of passing information from game manager to banker.
9
 */
10
trait PassInfoTrait
11
{
12
    /** @var int $playerPoints */
13
    private int $playerPoints = 0;
14
15
    /** @var Card[] $removedCards */
16
    private array $removedCards = [];
17
18
    /**
19
     * @param Card[] $removedCards Cards removed from the deck.
20
     * @param int    $playerPoints Players current points.
21
     */
22 6
    public function passInfo(array $removedCards, int $playerPoints): void
23
    {
24 6
        $this->removedCards = $removedCards;
25 6
        $this->playerPoints = $playerPoints;
26
    }
27
}
28