Passed
Branch master (ce217c)
by CloudyCity
09:37
created
Category
src/Kernel/Http/Parameters/Params.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -246,7 +246,7 @@
 block discarded – undo
246 246
      */
247 247
     protected function __toArray()
248 248
     {
249
-        return array_map(function ($value) {
249
+        return array_map(function($value) {
250 250
             if (is_object($value) && method_exists($value, 'toArray')) {
251 251
                 return $value->toArray();
252 252
             } else {
Please login to merge, or discard this patch.
src/Kernel/Http/Parameters/TimeRange.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -70,11 +70,11 @@
 block discarded – undo
70 70
      */
71 71
     protected function checkTimeRange()
72 72
     {
73
-        if (! ($this->start instanceof Carbon)) {
73
+        if (!($this->start instanceof Carbon)) {
74 74
             throw new \Exception('开始时间不能为空');
75 75
         }
76 76
 
77
-        if (! ($this->end instanceof  Carbon)) {
77
+        if (!($this->end instanceof  Carbon)) {
78 78
             throw new \Exception('结束时间不能为空');
79 79
         }
80 80
     }
Please login to merge, or discard this patch.
src/Kernel/BaseClient.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
     public function setResource($resource, $checkValid = true)
172 172
     {
173 173
         if ($checkValid && !Resources::checkResource($resource)) {
174
-            throw new InvalidResourceException('Invalid resource:' . $resource);
174
+            throw new InvalidResourceException('Invalid resource:'.$resource);
175 175
         }
176 176
 
177 177
         $this->resource = $resource;
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
     public function getRequestUrl($action)
199 199
     {
200 200
         if (!Resources::checkResource($resource = $this->getResource())) {
201
-            throw new InvalidResourceException('Invalid resource:' . $resource);
201
+            throw new InvalidResourceException('Invalid resource:'.$resource);
202 202
         }
203 203
 
204 204
         return sprintf('%s/%s/%s/%s', $this->getBaseUrl(), $this->getVersion(), $resource, $action);
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
     public function request($action, $params = [], $headers = [], $returnRaw = false)
222 222
     {
223 223
         if (!$this->checkAction($action)) {
224
-            throw new InvalidActionException("resource {$this->getResource()} does not support action:" .
224
+            throw new InvalidActionException("resource {$this->getResource()} does not support action:".
225 225
                 "{$action}, please check the official documentation");
226 226
         }
227 227
 
@@ -396,8 +396,8 @@  discard block
 block discarded – undo
396 396
      */
397 397
     protected function accessTokenMiddleware()
398 398
     {
399
-        return function ($handler) {
400
-            return function ($request, $options) use ($handler) {
399
+        return function($handler) {
400
+            return function($request, $options) use ($handler) {
401 401
                 $option['query']['access_token'] = $this->getAccessToken();
402 402
                 $option['query']['timestamp'] = time();
403 403
                 $option['query']['nonce'] = Support\generate_nonce();
@@ -414,8 +414,8 @@  discard block
 block discarded – undo
414 414
      */
415 415
     protected function advertiserIdMiddleware()
416 416
     {
417
-        return function ($handler) {
418
-            return function ($request, $options) use ($handler) {
417
+        return function($handler) {
418
+            return function($request, $options) use ($handler) {
419 419
                 $option['form_params']['account_id'] = $this->getAdvertiserId();
420 420
 
421 421
                 return $handler($request, $options);
Please login to merge, or discard this patch.