1 | <?php |
||
9 | class Achievement |
||
10 | { |
||
11 | use ImmutableTrait, SerializableTrait; |
||
12 | |||
13 | /** |
||
14 | * @var string |
||
15 | */ |
||
16 | private $name; |
||
17 | |||
18 | /** |
||
19 | * @var int |
||
20 | */ |
||
21 | private $stars; |
||
22 | |||
23 | /** |
||
24 | * Achievement constructor. |
||
25 | * @param string $name |
||
26 | * @param int $stars |
||
27 | * @throws ImmutableException |
||
28 | */ |
||
29 | public function __construct(string $name, int $stars) |
||
36 | |||
37 | /** |
||
38 | * @return string |
||
39 | */ |
||
40 | public function getName(): string |
||
44 | |||
45 | /** |
||
46 | * @return int |
||
47 | */ |
||
48 | public function getStars(): int |
||
52 | } |
||
53 |