DiceGraphic   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 19
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 19
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
    private $representation = [
8
        '⚀',
9
        '⚁',
10
        '⚂',
11
        '⚃',
12
        '⚄',
13
        '⚅',
14
    ];
15
16
    public function __construct()
17
    {
18
        parent::__construct();
19
    }
20
21
    public function getAsString(): string
22
    {
23
        return $this->representation[$this->value - 1];
24
    }
25
}
26