Completed
Pull Request — master (#9)
by
unknown
05:14
created
src/Client.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Api/Player/AchievementList.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,15 +5,14 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
src/Api/Player/PlayerItemLevelList.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,11 +13,11 @@
 block discarded – undo
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()
Please login to merge, or discard this patch.
src/Api/Player/Player.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,13 +29,13 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.