| @@ 11-69 (lines=59) @@ | ||
| 8 | use Igorsgm\TibiaDataApi\Traits\SerializableTrait; |
|
| 9 | use Illuminate\Support\Collection; |
|
| 10 | ||
| 11 | class Guilds |
|
| 12 | { |
|
| 13 | use ImmutableTrait, SerializableTrait; |
|
| 14 | ||
| 15 | /** |
|
| 16 | * @var string |
|
| 17 | */ |
|
| 18 | private $world; |
|
| 19 | ||
| 20 | /** |
|
| 21 | * @var Collection |
|
| 22 | */ |
|
| 23 | private $active; |
|
| 24 | ||
| 25 | /** |
|
| 26 | * @var Collection |
|
| 27 | */ |
|
| 28 | private $formation; |
|
| 29 | ||
| 30 | /** |
|
| 31 | * Guilds constructor. |
|
| 32 | * @param string $world |
|
| 33 | * @param array $active |
|
| 34 | * @param array $formation |
|
| 35 | * @throws ImmutableException |
|
| 36 | */ |
|
| 37 | public function __construct(string $world, Collection $active, Collection $formation) |
|
| 38 | { |
|
| 39 | $this->handleImmutableConstructor(); |
|
| 40 | ||
| 41 | $this->world = $world; |
|
| 42 | $this->active = $active; |
|
| 43 | $this->formation = $formation; |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * @return string |
|
| 48 | */ |
|
| 49 | public function getWorld(): string |
|
| 50 | { |
|
| 51 | return $this->world; |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @return Guild[] |
|
| 56 | */ |
|
| 57 | public function getActive(): Collection |
|
| 58 | { |
|
| 59 | return $this->active; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * @return Guild[] |
|
| 64 | */ |
|
| 65 | public function getFormation(): Collection |
|
| 66 | { |
|
| 67 | return $this->formation; |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||
| @@ 10-69 (lines=60) @@ | ||
| 7 | use Igorsgm\TibiaDataApi\Traits\SerializableTrait; |
|
| 8 | use Illuminate\Support\Collection; |
|
| 9 | ||
| 10 | class Highscores |
|
| 11 | { |
|
| 12 | use ImmutableTrait, SerializableTrait; |
|
| 13 | ||
| 14 | /** |
|
| 15 | * @var string |
|
| 16 | */ |
|
| 17 | private $world; |
|
| 18 | ||
| 19 | /** |
|
| 20 | * @var string |
|
| 21 | */ |
|
| 22 | private $category; |
|
| 23 | ||
| 24 | /** |
|
| 25 | * @var Collection |
|
| 26 | */ |
|
| 27 | private $highscores; |
|
| 28 | ||
| 29 | /** |
|
| 30 | * Highscores constructor. |
|
| 31 | * |
|
| 32 | * @param string $world |
|
| 33 | * @param string $category |
|
| 34 | * @param array $highscores |
|
| 35 | * @throws \Igorsgm\TibiaDataApi\Exceptions\ImmutableException |
|
| 36 | */ |
|
| 37 | public function __construct(string $world, string $category, Collection $highscores) |
|
| 38 | { |
|
| 39 | $this->handleImmutableConstructor(); |
|
| 40 | ||
| 41 | $this->world = $world; |
|
| 42 | $this->category = $category; |
|
| 43 | $this->highscores = $highscores; |
|
| 44 | } |
|
| 45 | ||
| 46 | /** |
|
| 47 | * @return string |
|
| 48 | */ |
|
| 49 | public function getWorld(): string |
|
| 50 | { |
|
| 51 | return $this->world; |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * @return string |
|
| 56 | */ |
|
| 57 | public function getCategory(): string |
|
| 58 | { |
|
| 59 | return $this->category; |
|
| 60 | } |
|
| 61 | ||
| 62 | /** |
|
| 63 | * @return Character[] |
|
| 64 | */ |
|
| 65 | public function getHighscores(): Collection |
|
| 66 | { |
|
| 67 | return $this->highscores; |
|
| 68 | } |
|
| 69 | } |
|
| 70 | ||