AbstractGameOptions   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 37
c 0
b 0
f 0
wmc 3
lcom 1
cbo 0
ccs 8
cts 8
cp 1
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getPlayerOptions() 0 4 1
A __construct() 0 4 1
A init() 0 4 1
1
<?php
2
3
namespace MiniGame\Options;
4
5
use MiniGame\GameOptions;
6
use MiniGame\PlayerOptions;
7
8
abstract class AbstractGameOptions implements GameOptions
9
{
10
    /**
11
     * @var PlayerOptions[]
12
     */
13
    protected $playerOptions;
14
15
    /**
16
     * Constructor
17
     *
18
     * @param PlayerOptions[]   $playerOptions
19
     */
20 3
    public function __construct(array $playerOptions = [])
21
    {
22 3
        $this->init($playerOptions);
23 3
    }
24
25
    /**
26
     * Init.
27
     *
28
     * @param PlayerOptions[]   $playerOptions
29
     */
30 3
    protected function init(array $playerOptions)
31
    {
32 3
        $this->playerOptions = $playerOptions;
33 3
    }
34
35
    /**
36
     * Returns the list of players
37
     *
38
     * @return PlayerOptions[]
39
     */
40 3
    public function getPlayerOptions()
41
    {
42 3
        return $this->playerOptions;
43
    }
44
}
45