Completed
Push — master ( 5075c7...d6d8a1 )
by Elf
05:24
created
src/Client.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      *
45 45
      * @param  array|object  $attributes
46 46
      */
47
-    public function __construct($attributes = [])
47
+    public function __construct($attributes = [ ])
48 48
     {
49 49
         parent::__construct($attributes);
50 50
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
     {
77 77
         $version = $this->agent->version($propertyName, $type);
78 78
 
79
-        return is_string($version) ? str_replace(['_', '+'], '.', $version) : $version;
79
+        return is_string($version) ? str_replace([ '_', '+' ], '.', $version) : $version;
80 80
     }
81 81
 
82 82
     /**
@@ -143,16 +143,16 @@  discard block
 block discarded – undo
143 143
         ];
144 144
 
145 145
         if ((bool) $this->agent->is('iOS')) {
146
-            $info['isIOS'] = true;
146
+            $info[ 'isIOS' ] = true;
147 147
         }
148 148
 
149 149
         if ((bool) $this->agent->is('AndroidOS')) {
150
-            $info['isAndroid'] = true;
151
-            $info['os'] = 'Android';
150
+            $info[ 'isAndroid' ] = true;
151
+            $info[ 'os' ] = 'Android';
152 152
         }
153 153
 
154 154
         if (is_string($this->version('MicroMessenger'))) {
155
-            $info['isWechat'] = true;
155
+            $info[ 'isWechat' ] = true;
156 156
         }
157 157
 
158 158
         return array_filter($info);
@@ -181,14 +181,14 @@  discard block
 block discarded – undo
181 181
     protected function getApiClientInfo($userAgent)
182 182
     {
183 183
         if (preg_match('#ua\((.+)\)#is', $userAgent, $matches)) {
184
-            if ($info = json_decode(urlsafe_base64_decode($matches[1]), true)) {
184
+            if ($info = json_decode(urlsafe_base64_decode($matches[ 1 ]), true)) {
185 185
                 if (is_array($info) && count($info) > 0) {
186 186
                     return $info;
187 187
                 }
188 188
             }
189 189
         }
190 190
 
191
-        return [];
191
+        return [ ];
192 192
     }
193 193
 
194 194
     /**
@@ -200,45 +200,45 @@  discard block
 block discarded – undo
200 200
     protected function getApiClientAttributes($info)
201 201
     {
202 202
         $info = array_filter($info);
203
-        $data = [];
203
+        $data = [ ];
204 204
 
205 205
         if (
206
-            ($data['os'] = array_get($info, 'os')) &&
207
-            ($data['osVersion'] = array_get($info, 'osV')) &&
208
-            ($data['platform'] = array_get($info, 'pf')) &&
209
-            ($data['locale'] = array_get($info, 'loc')) &&
210
-            ($data['network'] = array_get($info, 'net')) &&
211
-            ($data['app'] = array_get($info, 'app')) &&
212
-            ($data['appVersion'] = array_get($info, 'appV')) &&
213
-            ($data['appChannel'] = array_get($info, 'appC')) &&
214
-            ($data['tdid'] = array_get($info, 'tdid'))
206
+            ($data[ 'os' ] = array_get($info, 'os')) &&
207
+            ($data[ 'osVersion' ] = array_get($info, 'osV')) &&
208
+            ($data[ 'platform' ] = array_get($info, 'pf')) &&
209
+            ($data[ 'locale' ] = array_get($info, 'loc')) &&
210
+            ($data[ 'network' ] = array_get($info, 'net')) &&
211
+            ($data[ 'app' ] = array_get($info, 'app')) &&
212
+            ($data[ 'appVersion' ] = array_get($info, 'appV')) &&
213
+            ($data[ 'appChannel' ] = array_get($info, 'appC')) &&
214
+            ($data[ 'tdid' ] = array_get($info, 'tdid'))
215 215
         ) {
216
-            if ($data['os'] === 'iPhone OS') {
217
-                $data['os'] = 'iOS';
216
+            if ($data[ 'os' ] === 'iPhone OS') {
217
+                $data[ 'os' ] = 'iOS';
218 218
             }
219 219
 
220
-            $data['isIOS'] = $data['os'] === 'iOS';
221
-            $data['isAndroid'] = $data['os'] === 'Android';
220
+            $data[ 'isIOS' ] = $data[ 'os' ] === 'iOS';
221
+            $data[ 'isAndroid' ] = $data[ 'os' ] === 'Android';
222 222
 
223
-            $data['isAppStoreChannel'] = $data['appChannel'] === 'App Store';
224
-            $data['isDebugChannel'] = $data['appChannel'] === 'Debug';
225
-            $data['isAdHocChannel'] = $data['appChannel'] === 'Ad Hoc';
226
-            $data['isInHouseChannel'] = $data['appChannel'] === 'In House';
223
+            $data[ 'isAppStoreChannel' ] = $data[ 'appChannel' ] === 'App Store';
224
+            $data[ 'isDebugChannel' ] = $data[ 'appChannel' ] === 'Debug';
225
+            $data[ 'isAdHocChannel' ] = $data[ 'appChannel' ] === 'Ad Hoc';
226
+            $data[ 'isInHouseChannel' ] = $data[ 'appChannel' ] === 'In House';
227 227
 
228
-            $data['isAppStoreReviewing'] = (
229
-                $data['isIOS'] &&
230
-                $data['isAppStoreChannel'] &&
231
-                $data['appVersion'] === config('var.ios.app_store_reviewing_version')
228
+            $data[ 'isAppStoreReviewing' ] = (
229
+                $data[ 'isIOS' ] &&
230
+                $data[ 'isAppStoreChannel' ] &&
231
+                $data[ 'appVersion' ] === config('var.ios.app_store_reviewing_version')
232 232
             );
233 233
 
234
-            $data['isApiClient'] = true;
234
+            $data[ 'isApiClient' ] = true;
235 235
 
236 236
             return array_filter($data);
237 237
         }
238 238
 
239 239
         $this->resetApiClientAttributes();
240 240
 
241
-        return [];
241
+        return [ ];
242 242
     }
243 243
 
244 244
     /**
@@ -247,16 +247,16 @@  discard block
 block discarded – undo
247 247
     protected function resetApiClientAttributes()
248 248
     {
249 249
         unset(
250
-            $this->attributes['network'],
251
-            $this->attributes['app'],
252
-            $this->attributes['appVersion'],
253
-            $this->attributes['appChannel'],
254
-            $this->attributes['tdid'],
255
-            $this->attributes['isAppStoreChannel'],
256
-            $this->attributes['isDebugChannel'],
257
-            $this->attributes['isAdHocChannel'],
258
-            $this->attributes['isInHouseChannel'],
259
-            $this->attributes['isAppStoreReviewing']
250
+            $this->attributes[ 'network' ],
251
+            $this->attributes[ 'app' ],
252
+            $this->attributes[ 'appVersion' ],
253
+            $this->attributes[ 'appChannel' ],
254
+            $this->attributes[ 'tdid' ],
255
+            $this->attributes[ 'isAppStoreChannel' ],
256
+            $this->attributes[ 'isDebugChannel' ],
257
+            $this->attributes[ 'isAdHocChannel' ],
258
+            $this->attributes[ 'isInHouseChannel' ],
259
+            $this->attributes[ 'isAppStoreReviewing' ]
260 260
         );
261 261
     }
262 262
 
@@ -269,6 +269,6 @@  discard block
 block discarded – undo
269 269
      */
270 270
     public function __call($method, $parameters)
271 271
     {
272
-        return call_user_func_array([$this->agent, $method], $parameters);
272
+        return call_user_func_array([ $this->agent, $method ], $parameters);
273 273
     }
274 274
 }
Please login to merge, or discard this patch.
src/Http/Middleware/EncryptCookies.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@  discard block
 block discarded – undo
11 11
      *
12 12
      * @var array
13 13
      */
14
-    protected $only = [];
14
+    protected $only = [ ];
15 15
 
16 16
     /**
17 17
      * Enable encryption for the given cookie name(s).
@@ -32,6 +32,6 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function isDisabled($name)
34 34
     {
35
-        return ! in_array($name, $this->only);
35
+        return !in_array($name, $this->only);
36 36
     }
37 37
 }
Please login to merge, or discard this patch.
src/Traits/FluentArrayAccess.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
      */
22 22
     public function offsetExists($offset)
23 23
     {
24
-        return isset($this->attributes[$offset]);
24
+        return isset($this->attributes[ $offset ]);
25 25
     }
26 26
 
27 27
     /**
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
      */
45 45
     public function offsetSet($offset, $value)
46 46
     {
47
-        $this->attributes[$offset] = $value;
47
+        $this->attributes[ $offset ] = $value;
48 48
     }
49 49
 
50 50
     /**
@@ -55,6 +55,6 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function offsetUnset($offset)
57 57
     {
58
-        unset($this->attributes[$offset]);
58
+        unset($this->attributes[ $offset ]);
59 59
     }
60 60
 }
Please login to merge, or discard this patch.
src/Traits/Eloquent/FreshCreatedAt.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@
 block discarded – undo
26 26
      */
27 27
     protected static function bootFreshCreatedAt()
28 28
     {
29
-        static::creating(function ($model) {
29
+        static::creating(function($model) {
30 30
             $model->setCreatedAt($model->freshTimestamp());
31 31
         });
32 32
     }
Please login to merge, or discard this patch.
src/Traits/Eloquent/SexAttribute.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,6 @@
 block discarded – undo
24 24
      */
25 25
     public function setSexAttribute($value)
26 26
     {
27
-        $this->attributes['sex'] = Sex::type($value);
27
+        $this->attributes[ 'sex' ] = Sex::type($value);
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
src/Traits/ImageStorage.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@
 block discarded – undo
20 20
      */
21 21
     protected function storeImageFile($file, $identifier = null)
22 22
     {
23
-        if ($file instanceof UploadedFile && ! $file->isValid()) {
23
+        if ($file instanceof UploadedFile && !$file->isValid()) {
24 24
             return;
25 25
         }
26 26
 
Please login to merge, or discard this patch.
src/Image/Filters/Filter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -17,7 +17,7 @@
 block discarded – undo
17 17
     public function __call($method, $parameters)
18 18
     {
19 19
         if (property_exists($this, $method) && count($parameters) > 0) {
20
-            $this->{$method} = $parameters[0];
20
+            $this->{$method} = $parameters[ 0 ];
21 21
 
22 22
             return $this;
23 23
         }
Please login to merge, or discard this patch.
src/Image/Filters/Fit.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
      */
48 48
     public function applyFilter(Image $image)
49 49
     {
50
-        return $image->orientate()->fit($this->width, $this->height, function ($constraint) {
50
+        return $image->orientate()->fit($this->width, $this->height, function($constraint) {
51 51
             $this->constraint($constraint);
52 52
         }, $this->position);
53 53
     }
Please login to merge, or discard this patch.
src/Image/Filters/Resize.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
42 42
      */
43 43
     public function applyFilter(Image $image)
44 44
     {
45
-        return $image->orientate()->resize($this->width, $this->height, function ($constraint) {
45
+        return $image->orientate()->resize($this->width, $this->height, function($constraint) {
46 46
             $this->constraint($constraint);
47 47
         });
48 48
     }
Please login to merge, or discard this patch.