Completed
Pull Request — master (#9)
by
unknown
04:38
created
src/Client.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function getClan($tag)
34 34
     {
35
-        $response = $this->request('clans/' . urlencode($tag));
35
+        $response = $this->request('clans/'.urlencode($tag));
36 36
 
37 37
         return Clan::makeFromArray($response);
38 38
     }
@@ -48,9 +48,9 @@  discard block
 block discarded – undo
48 48
     {
49 49
         $params = is_array($params) ? $params : ['name' => $params];
50 50
 
51
-        $response = $this->request('clans?' . http_build_query($params));
51
+        $response = $this->request('clans?'.http_build_query($params));
52 52
 
53
-        return array_map(function ($item) {
53
+        return array_map(function($item) {
54 54
             return Clan::makeFromArray($item);
55 55
         }, $response['items']);
56 56
     }
@@ -63,9 +63,9 @@  discard block
 block discarded – undo
63 63
      */
64 64
     public function getClanWarLog($tag)
65 65
     {
66
-        $response = $this->request('clans/' . urlencode($tag).'/warlog');
66
+        $response = $this->request('clans/'.urlencode($tag).'/warlog');
67 67
         
68
-        return array_map(function ($item) {
68
+        return array_map(function($item) {
69 69
             return WarLog::makeFromArray($item);
70 70
         }, $response['items']);
71 71
 
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function getLocation($id)
80 80
     {
81
-        return Location::makeFromArray($this->request('locations/' . urlencode($id)));
81
+        return Location::makeFromArray($this->request('locations/'.urlencode($id)));
82 82
     }
83 83
 
84 84
     /**
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
      */
89 89
     public function getLocations()
90 90
     {
91
-        return array_map(function ($item) {
91
+        return array_map(function($item) {
92 92
             return Location::makeFromArray($item);
93 93
         }, $this->request('locations')['items']);
94 94
     }
@@ -101,15 +101,15 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function getRankingsForLocation($locationId, $rankingId)
103 103
     {
104
-        $url = 'locations/' . $locationId . '/rankings/' . $rankingId;
104
+        $url = 'locations/'.$locationId.'/rankings/'.$rankingId;
105 105
 
106 106
         if ($rankingId == 'clans') {
107
-            return array_map(function ($item) {
107
+            return array_map(function($item) {
108 108
                 return Clan::makeFromArray($item);
109 109
             }, $this->request($url)['items']);
110 110
         }
111 111
 
112
-        return array_map(function ($item) {
112
+        return array_map(function($item) {
113 113
             return Player::makeFromArray($item);
114 114
         }, $this->request($url)['items']);
115 115
     }
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function getLeagues()
123 123
     {
124
-        return array_map(function ($item) {
124
+        return array_map(function($item) {
125 125
             return League::makeFromArray($item);
126 126
         }, $this->request('leagues')['items']);
127 127
     }
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
     protected function request($url)
134 134
     {
135 135
         $response = $this->getHttpClient()
136
-                         ->request('GET', $url, ['headers' => ['authorization' => 'Bearer ' . $this->getToken()]]);
136
+                         ->request('GET', $url, ['headers' => ['authorization' => 'Bearer '.$this->getToken()]]);
137 137
 
138 138
         return ResponseMediator::convertResponseToArray($response);
139 139
     }
Please login to merge, or discard this patch.