DiceGraphic   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 2
Bugs 0 Features 0
Metric Value
eloc 10
c 2
b 0
f 0
dl 0
loc 22
rs 10
ccs 4
cts 4
cp 1
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getAsString() 0 3 1
1
<?php
2
3
namespace App\Dice;
4
5
class DiceGraphic extends Dice
6
{
7
    /**
8
     * @var string[]
9
     */
10
    private array $representation = [
11
        '⚀',
12
        '⚁',
13
        '⚂',
14
        '⚃',
15
        '⚄',
16
        '⚅',
17
    ];
18
19 7
    public function __construct()
20
    {
21 7
        parent::__construct();
22
    }
23
24 4
    public function getAsString(): string
25
    {
26 4
        return $this->representation[$this->value - 1];
27
    }
28
29
}
30