| Total Complexity | 3 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class CardGraphic extends Card |
||
| 6 | { |
||
| 7 | private $representation; |
||
| 8 | |||
| 9 | 26 | public function __construct($suit, $value) |
|
| 13 | } |
||
| 14 | |||
| 15 | 26 | private function generateRepresentation(): string |
|
| 16 | { |
||
| 17 | 26 | $symbols = [ |
|
| 18 | 26 | 'Hearts' => '♥', |
|
| 19 | 26 | 'Diamonds' => '♦', |
|
| 20 | 26 | 'Clubs' => '♣', |
|
| 21 | 26 | 'Spades' => '♠', |
|
| 22 | 26 | ]; |
|
| 23 | |||
| 24 | 26 | return $symbols[$this->suit] . $this->value; |
|
| 25 | } |
||
| 26 | |||
| 27 | 1 | public function getAsString(): string |
|
| 30 | } |
||
| 31 | } |
||
| 32 |