@@ -116,7 +116,7 @@ |
||
| 116 | 116 | protected function request($url) |
| 117 | 117 | { |
| 118 | 118 | $response = $this->getHttpClient() |
| 119 | - ->request('GET', $url, ['headers' => ['authorization' => 'Bearer ' . $this->getToken()]]); |
|
| 119 | + ->request('GET', $url, ['headers' => ['authorization' => 'Bearer ' . $this->getToken()]]); |
|
| 120 | 120 | |
| 121 | 121 | return ResponseMediator::convertResponseToArray($response); |
| 122 | 122 | } |
@@ -29,13 +29,13 @@ |
||
| 29 | 29 | |
| 30 | 30 | class Player extends AbstractResource |
| 31 | 31 | { |
| 32 | - protected $casts = [ |
|
| 33 | - 'league' => League::class, |
|
| 34 | - 'clan' => Clan::class, |
|
| 35 | - 'spells' => PlayerItemLevelList::class, |
|
| 36 | - 'heroes' => PlayerItemLevelList::class, |
|
| 37 | - 'troops' => PlayerItemLevelList::class, |
|
| 38 | - 'achievements' => AchievementList::class |
|
| 39 | - ]; |
|
| 32 | + protected $casts = [ |
|
| 33 | + 'league' => League::class, |
|
| 34 | + 'clan' => Clan::class, |
|
| 35 | + 'spells' => PlayerItemLevelList::class, |
|
| 36 | + 'heroes' => PlayerItemLevelList::class, |
|
| 37 | + 'troops' => PlayerItemLevelList::class, |
|
| 38 | + 'achievements' => AchievementList::class |
|
| 39 | + ]; |
|
| 40 | 40 | } |
| 41 | 41 | |
@@ -5,19 +5,18 @@ |
||
| 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 | - /** |
|
| 17 | - * @return array |
|
| 18 | - */ |
|
| 19 | - public function all() |
|
| 20 | - { |
|
| 21 | - return $this->get(); |
|
| 22 | - } |
|
| 15 | + /** |
|
| 16 | + * @return array |
|
| 17 | + */ |
|
| 18 | + public function all() |
|
| 19 | + { |
|
| 20 | + return $this->get(); |
|
| 21 | + } |
|
| 23 | 22 | } |
@@ -13,15 +13,15 @@ |
||
| 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 | - /** |
|
| 21 | - * @return array |
|
| 22 | - */ |
|
| 23 | - public function all() |
|
| 24 | - { |
|
| 25 | - return $this->get(); |
|
| 26 | - } |
|
| 20 | + /** |
|
| 21 | + * @return array |
|
| 22 | + */ |
|
| 23 | + public function all() |
|
| 24 | + { |
|
| 25 | + return $this->get(); |
|
| 26 | + } |
|
| 27 | 27 | } |