PassInfoTrait::passInfo()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 2
c 1
b 0
f 1
nc 1
nop 2
dl 0
loc 4
rs 10
ccs 3
cts 3
cp 1
crap 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