Completed
Pull Request — master (#7)
by
unknown
02:11
created
src/Api/Clan/MemberList.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Client.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
      */
32 32
     public function getClan($tag)
33 33
     {
34
-        $response = $this->request('clans/' . urlencode($tag));
34
+        $response = $this->request('clans/'.urlencode($tag));
35 35
 
36 36
         return Clan::makeFromArray($response);
37 37
     }
@@ -47,9 +47,9 @@  discard block
 block discarded – undo
47 47
     {
48 48
         $params = is_array($params) ? $params : ['name' => $params];
49 49
 
50
-        $response = $this->request('clans?' . http_build_query($params));
50
+        $response = $this->request('clans?'.http_build_query($params));
51 51
 
52
-        return array_map(function ($item) {
52
+        return array_map(function($item) {
53 53
             return Clan::makeFromArray($item);
54 54
         }, $response['items']);
55 55
     }
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
      */
62 62
     public function getLocation($id)
63 63
     {
64
-        return Location::makeFromArray($this->request('locations/' . urlencode($id)));
64
+        return Location::makeFromArray($this->request('locations/'.urlencode($id)));
65 65
     }
66 66
 
67 67
     /**
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function getLocations()
73 73
     {
74
-        return array_map(function ($item) {
74
+        return array_map(function($item) {
75 75
             return Location::makeFromArray($item);
76 76
         }, $this->request('locations')['items']);
77 77
     }
@@ -84,15 +84,15 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function getRankingsForLocation($locationId, $rankingId)
86 86
     {
87
-        $url = 'locations/' . $locationId . '/rankings/' . $rankingId;
87
+        $url = 'locations/'.$locationId.'/rankings/'.$rankingId;
88 88
 
89 89
         if ($rankingId == 'clans') {
90
-            return array_map(function ($item) {
90
+            return array_map(function($item) {
91 91
                 return Clan::makeFromArray($item);
92 92
             }, $this->request($url)['items']);
93 93
         }
94 94
 
95
-        return array_map(function ($item) {
95
+        return array_map(function($item) {
96 96
             return Player::makeFromArray($item);
97 97
         }, $this->request($url)['items']);
98 98
     }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     public function getLeagues()
106 106
     {
107
-        return array_map(function ($item) {
107
+        return array_map(function($item) {
108 108
             return League::makeFromArray($item);
109 109
         }, $this->request('leagues')['items']);
110 110
     }
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
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
     }
Please login to merge, or discard this patch.