Total Complexity | 5 |
Total Lines | 28 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
5 | final class Card |
||
6 | { |
||
7 | private $id; |
||
8 | private $attacking = false; |
||
9 | |||
10 | public function __construct(string $id) |
||
13 | } |
||
14 | |||
15 | public function type(): string |
||
16 | { |
||
17 | return $this->id; |
||
18 | } |
||
19 | |||
20 | public function is(Card $theOther): bool |
||
21 | { |
||
22 | return $this->id === $theOther->id; |
||
23 | } |
||
24 | |||
25 | public function isAttacking(): bool |
||
26 | { |
||
27 | return $this->attacking; |
||
28 | } |
||
29 | |||
30 | public function attack(): void |
||
33 | } |
||
34 | } |
||
35 |