@@ -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 | } |
@@ -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 | } |
@@ -42,7 +42,7 @@ discard block |
||
42 | 42 | { |
43 | 43 | $members = $this->all(); |
44 | 44 | |
45 | - return array_filter($members, function ($player) { |
|
45 | + return array_filter($members, function($player) { |
|
46 | 46 | return $player->isLeader(); |
47 | 47 | })[0]; |
48 | 48 | } |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | { |
55 | 55 | $members = $this->all(); |
56 | 56 | |
57 | - return array_filter($members, function ($player) { |
|
57 | + return array_filter($members, function($player) { |
|
58 | 58 | return $player->isElder(); |
59 | 59 | }); |
60 | 60 | } |
@@ -66,7 +66,7 @@ discard block |
||
66 | 66 | { |
67 | 67 | $members = $this->all(); |
68 | 68 | |
69 | - return array_filter($members, function ($player) { |
|
69 | + return array_filter($members, function($player) { |
|
70 | 70 | return $player->isCoLeader(); |
71 | 71 | }); |
72 | 72 | } |
@@ -18,8 +18,8 @@ |
||
18 | 18 | ]; |
19 | 19 | |
20 | 20 | /** |
21 | - * @return array |
|
22 | - */ |
|
21 | + * @return array |
|
22 | + */ |
|
23 | 23 | public function all() |
24 | 24 | { |
25 | 25 | return $this->get(); |
@@ -18,8 +18,8 @@ |
||
18 | 18 | ]; |
19 | 19 | |
20 | 20 | /** |
21 | - * @return array |
|
22 | - */ |
|
21 | + * @return array |
|
22 | + */ |
|
23 | 23 | public function all() |
24 | 24 | { |
25 | 25 | return $this->get(); |