@@ 10-54 (lines=45) @@ | ||
7 | use Igorsgm\TibiaDataApi\Traits\ImmutableTrait; |
|
8 | use Igorsgm\TibiaDataApi\Traits\SerializableTrait; |
|
9 | ||
10 | class AccountInformation |
|
11 | { |
|
12 | use ImmutableTrait, SerializableTrait; |
|
13 | ||
14 | /** |
|
15 | * @var string |
|
16 | */ |
|
17 | private $loyaltyTitle; |
|
18 | ||
19 | /** |
|
20 | * @var Carbon |
|
21 | */ |
|
22 | private $created; |
|
23 | ||
24 | /** |
|
25 | * AccountInformation constructor. |
|
26 | * |
|
27 | * @param string $loyaltyTitle |
|
28 | * @param Carbon $created |
|
29 | * @throws ImmutableException |
|
30 | */ |
|
31 | public function __construct(string $loyaltyTitle, Carbon $created) |
|
32 | { |
|
33 | $this->handleImmutableConstructor(); |
|
34 | ||
35 | $this->loyaltyTitle = $loyaltyTitle; |
|
36 | $this->created = $created; |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @return string |
|
41 | */ |
|
42 | public function getLoyaltyTitle(): string |
|
43 | { |
|
44 | return $this->loyaltyTitle; |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * @return Carbon |
|
49 | */ |
|
50 | public function getCreated(): Carbon |
|
51 | { |
|
52 | return $this->created; |
|
53 | } |
|
54 | } |
|
55 |
@@ 11-54 (lines=44) @@ | ||
8 | use Igorsgm\TibiaDataApi\Traits\ImmutableTrait; |
|
9 | use Igorsgm\TibiaDataApi\Traits\SerializableTrait; |
|
10 | ||
11 | class Invitee |
|
12 | { |
|
13 | use ImmutableTrait, SerializableTrait; |
|
14 | ||
15 | /** |
|
16 | * @var string |
|
17 | */ |
|
18 | private $name; |
|
19 | ||
20 | /** |
|
21 | * @var Carbon |
|
22 | */ |
|
23 | private $invited; |
|
24 | ||
25 | /** |
|
26 | * Invitee constructor. |
|
27 | * @param string $name |
|
28 | * @param Carbon $invited |
|
29 | * @throws ImmutableException |
|
30 | */ |
|
31 | public function __construct(string $name, Carbon $invited) |
|
32 | { |
|
33 | $this->handleImmutableConstructor(); |
|
34 | ||
35 | $this->name = $name; |
|
36 | $this->invited = $invited; |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @return string |
|
41 | */ |
|
42 | public function getName(): string |
|
43 | { |
|
44 | return $this->name; |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * @return Carbon |
|
49 | */ |
|
50 | public function getInvited(): Carbon |
|
51 | { |
|
52 | return $this->invited; |
|
53 | } |
|
54 | } |
|
55 |
@@ 10-53 (lines=44) @@ | ||
7 | use Igorsgm\TibiaDataApi\Traits\ImmutableTrait; |
|
8 | use Igorsgm\TibiaDataApi\Traits\SerializableTrait; |
|
9 | ||
10 | class OnlineRecord |
|
11 | { |
|
12 | use ImmutableTrait, SerializableTrait; |
|
13 | ||
14 | /** |
|
15 | * @var int |
|
16 | */ |
|
17 | private $number; |
|
18 | ||
19 | /** |
|
20 | * @var Carbon |
|
21 | */ |
|
22 | private $date; |
|
23 | ||
24 | /** |
|
25 | * OnlineRecord constructor. |
|
26 | * @param int $number |
|
27 | * @param Carbon $date |
|
28 | * @throws ImmutableException |
|
29 | */ |
|
30 | public function __construct(int $number, Carbon $date) |
|
31 | { |
|
32 | $this->handleImmutableConstructor(); |
|
33 | ||
34 | $this->number = $number; |
|
35 | $this->date = $date; |
|
36 | } |
|
37 | ||
38 | /** |
|
39 | * @return int |
|
40 | */ |
|
41 | public function getNumber(): int |
|
42 | { |
|
43 | return $this->number; |
|
44 | } |
|
45 | ||
46 | /** |
|
47 | * @return Carbon |
|
48 | */ |
|
49 | public function getDate(): Carbon |
|
50 | { |
|
51 | return $this->date; |
|
52 | } |
|
53 | } |
|
54 |