Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
| Total | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
CRAP | |
100.00% |
3 / 3 |
| Rasb14\T100\DiceGraphic | |
100.00% |
1 / 1 |
|
100.00% |
2 / 2 |
2 | |
100.00% |
3 / 3 |
| __construct | |
100.00% |
1 / 1 |
1 | |
100.00% |
2 / 2 |
|||
| graphic | |
100.00% |
1 / 1 |
1 | |
100.00% |
1 / 1 |
|||
| <?php | |
| namespace Rasb14\T100; | |
| /** | |
| * DiceGraphic, a six sided die with graphics. | |
| */ | |
| class DiceGraphic extends Dice | |
| { | |
| /** | |
| * @var integer SIDES Number of sides of the Dice. | |
| */ | |
| const SIDES = 6; | |
| /** | |
| * Constructor to initiate the dice with six number of sides. | |
| */ | |
| public function __construct() | |
| { | |
| parent::__construct(self::SIDES); | |
| } | |
| /** | |
| * Gets the graphic representation of the die. | |
| * | |
| * @return string as the graphical representation of the value. | |
| */ | |
| public function graphic() | |
| { | |
| return "dice-" . $this->value; | |
| } | |
| } |