| @@ -33,7 +33,7 @@ discard block | ||
| 33 | 33 | */ | 
| 34 | 34 | public function getClan($tag) | 
| 35 | 35 |      { | 
| 36 | -        $response = $this->request('clans/' . urlencode($tag)); | |
| 36 | +        $response = $this->request('clans/'.urlencode($tag)); | |
| 37 | 37 | |
| 38 | 38 | return Clan::makeFromArray($response); | 
| 39 | 39 | } | 
| @@ -49,9 +49,9 @@ discard block | ||
| 49 | 49 |      { | 
| 50 | 50 | $params = is_array($params) ? $params : ['name' => $params]; | 
| 51 | 51 | |
| 52 | -        $response = $this->request('clans?' . http_build_query($params)); | |
| 52 | +        $response = $this->request('clans?'.http_build_query($params)); | |
| 53 | 53 | |
| 54 | -        return array_map(function ($item) { | |
| 54 | +        return array_map(function($item) { | |
| 55 | 55 | return Clan::makeFromArray($item); | 
| 56 | 56 | }, $response['items']); | 
| 57 | 57 | } | 
| @@ -64,9 +64,9 @@ discard block | ||
| 64 | 64 | */ | 
| 65 | 65 | public function getClanWarLog($tag) | 
| 66 | 66 |      { | 
| 67 | -        $response = $this->request('clans/' . urlencode($tag).'/warlog'); | |
| 67 | +        $response = $this->request('clans/'.urlencode($tag).'/warlog'); | |
| 68 | 68 | |
| 69 | -        return array_map(function ($item) { | |
| 69 | +        return array_map(function($item) { | |
| 70 | 70 | return WarLog::makeFromArray($item); | 
| 71 | 71 | }, $response['items']); | 
| 72 | 72 | |
| @@ -80,7 +80,7 @@ discard block | ||
| 80 | 80 | */ | 
| 81 | 81 | public function getPlayer($tag) | 
| 82 | 82 |      { | 
| 83 | -        $response = $this->request('players/' . urlencode($tag)); | |
| 83 | +        $response = $this->request('players/'.urlencode($tag)); | |
| 84 | 84 | |
| 85 | 85 | return FullPlayer::makeFromArray($response); | 
| 86 | 86 | } | 
| @@ -92,7 +92,7 @@ discard block | ||
| 92 | 92 | */ | 
| 93 | 93 | public function getLocation($id) | 
| 94 | 94 |      { | 
| 95 | -        return Location::makeFromArray($this->request('locations/' . urlencode($id))); | |
| 95 | +        return Location::makeFromArray($this->request('locations/'.urlencode($id))); | |
| 96 | 96 | } | 
| 97 | 97 | |
| 98 | 98 | /** | 
| @@ -102,7 +102,7 @@ discard block | ||
| 102 | 102 | */ | 
| 103 | 103 | public function getLocations() | 
| 104 | 104 |      { | 
| 105 | -        return array_map(function ($item) { | |
| 105 | +        return array_map(function($item) { | |
| 106 | 106 | return Location::makeFromArray($item); | 
| 107 | 107 |          }, $this->request('locations')['items']); | 
| 108 | 108 | } | 
| @@ -115,15 +115,15 @@ discard block | ||
| 115 | 115 | */ | 
| 116 | 116 | public function getRankingsForLocation($locationId, $rankingId) | 
| 117 | 117 |      { | 
| 118 | - $url = 'locations/' . $locationId . '/rankings/' . $rankingId; | |
| 118 | + $url = 'locations/'.$locationId.'/rankings/'.$rankingId; | |
| 119 | 119 | |
| 120 | 120 |          if ($rankingId == 'clans') { | 
| 121 | -            return array_map(function ($item) { | |
| 121 | +            return array_map(function($item) { | |
| 122 | 122 | return Clan::makeFromArray($item); | 
| 123 | 123 | }, $this->request($url)['items']); | 
| 124 | 124 | } | 
| 125 | 125 | |
| 126 | -        return array_map(function ($item) { | |
| 126 | +        return array_map(function($item) { | |
| 127 | 127 | return Player::makeFromArray($item); | 
| 128 | 128 | }, $this->request($url)['items']); | 
| 129 | 129 | } | 
| @@ -135,7 +135,7 @@ discard block | ||
| 135 | 135 | */ | 
| 136 | 136 | public function getLeagues() | 
| 137 | 137 |      { | 
| 138 | -        return array_map(function ($item) { | |
| 138 | +        return array_map(function($item) { | |
| 139 | 139 | return League::makeFromArray($item); | 
| 140 | 140 |          }, $this->request('leagues')['items']); | 
| 141 | 141 | } | 
| @@ -147,7 +147,7 @@ discard block | ||
| 147 | 147 | protected function request($url) | 
| 148 | 148 |      { | 
| 149 | 149 | $response = $this->getHttpClient() | 
| 150 | -                         ->request('GET', $url, ['headers' => ['authorization' => 'Bearer ' . $this->getToken()]]); | |
| 150 | +                         ->request('GET', $url, ['headers' => ['authorization' => 'Bearer '.$this->getToken()]]); | |
| 151 | 151 | |
| 152 | 152 | return ResponseMediator::convertResponseToArray($response); | 
| 153 | 153 | } | 
| @@ -5,15 +5,14 @@ | ||
| 5 | 5 | use ClashOfClans\Api\AbstractResource; | 
| 6 | 6 | |
| 7 | 7 | /** | 
| 8 | - | |
| 9 | 8 | */ | 
| 10 | 9 | class AchievementList extends AbstractResource | 
| 11 | 10 |  { | 
| 12 | - protected $casts = [ | |
| 13 | - 'all' => Achievement::class | |
| 14 | - ]; | |
| 11 | + protected $casts = [ | |
| 12 | + 'all' => Achievement::class | |
| 13 | + ]; | |
| 15 | 14 | |
| 16 | - /** | |
| 15 | + /** | |
| 17 | 16 | * @return array | 
| 18 | 17 | */ | 
| 19 | 18 | public function all() | 
| @@ -13,11 +13,11 @@ | ||
| 13 | 13 | */ | 
| 14 | 14 | class PlayerItemLevelList extends AbstractResource | 
| 15 | 15 |  { | 
| 16 | - protected $casts = [ | |
| 17 | - 'all' => PlayerItemLevel::class | |
| 18 | - ]; | |
| 16 | + protected $casts = [ | |
| 17 | + 'all' => PlayerItemLevel::class | |
| 18 | + ]; | |
| 19 | 19 | |
| 20 | - /** | |
| 20 | + /** | |
| 21 | 21 | * @return array | 
| 22 | 22 | */ | 
| 23 | 23 | public function all() | 
| @@ -25,7 +25,6 @@ discard block | ||
| 25 | 25 | * @method PlayerItemLevelList troops() | 
| 26 | 26 | * @method PlayerItemLevelList heroes() | 
| 27 | 27 | * @method PlayerItemLevelList spells() | 
| 28 | - | |
| 29 | 28 | */ | 
| 30 | 29 | /* | 
| 31 | 30 |    "legendStatistics": { | 
| @@ -56,7 +55,7 @@ discard block | ||
| 56 | 55 | 'spells' => PlayerItemLevelList::class, | 
| 57 | 56 | 'heroes' => PlayerItemLevelList::class, | 
| 58 | 57 | 'troops' => PlayerItemLevelList::class, | 
| 59 | - 'achievements' => AchievementList::class | |
| 58 | + 'achievements' => AchievementList::class | |
| 60 | 59 | ]; | 
| 61 | 60 | |
| 62 | 61 | } |