/** * Get all available leagues * * @return array */ public function getLeagues() { return array_map(function ($item) { return League::makeFromArray($item); }, $this->request('leagues')['items']); }
public function testCastsPropertiesProperly() { $this->assertInstanceOf(\ClashOfClans\Api\League\Icon::class, $this->league->icon()); }