DiceGraphic   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Test Coverage

Coverage 0%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 10
c 1
b 0
f 0
dl 0
loc 20
rs 10
ccs 0
cts 4
cp 0
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
    /** @var string[] $representation */
8
    private array $representation = [
9
        '⚀',
10
        '⚁',
11
        '⚂',
12
        '⚃',
13
        '⚄',
14
        '⚅',
15
    ];
16
17
    public function __construct()
18
    {
19
        parent::__construct();
20
    }
21
22
    public function getAsString(): string
23
    {
24
        return $this->representation[$this->value - 1];
25
    }
26
}
27