Passed
Branch account (184271)
by vincent
02:51
created
src/VfacTmdb/Exceptions/NotFoundException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
src/VfacTmdb/Exceptions/NotYetImplementedException.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
src/VfacTmdb/Factory/Builder/NullLoggerBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
src/VfacTmdb/Catalog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
src/VfacTmdb/Tmdb.php 3 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -162,15 +162,15 @@
 block discarded – undo
162 162
     protected function sendRequest(string $method, string $url, array $form_params = array()) : ?\stdClass
163 163
     {
164 164
         switch ($method) {
165
-              case 'GET':
165
+                case 'GET':
166 166
                   $res = $this->http_request->getResponse($url);
167
-                  break;
168
-              case 'POST':
167
+                    break;
168
+                case 'POST':
169 169
                   $res = $this->http_request->postResponse($url, [], $form_params);
170
-                  break;
171
-              case 'DELETE':
170
+                    break;
171
+                case 'DELETE':
172 172
                   $res = $this->http_request->deleteResponse($url);
173
-                  break;
173
+                    break;
174 174
         }
175 175
 
176 176
         if (empty($res->getBody()))
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 /**
4 4
  * This file is part of the Tmdb package.
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function checkOptions(array $options) : array
238 238
     {
239
-        $params                  = [];
239
+        $params = [];
240 240
         // Set default options
241 241
         // $params['language']      = $this->language;
242 242
         // $params['include_adult'] = $this->include_adult;
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
             default:
314 314
                 throw new IncorrectParamException;
315 315
         }
316
-        return 'created_at.'.$direction;
316
+        return 'created_at.' . $direction;
317 317
     }
318 318
 
319 319
     /**
Please login to merge, or discard this patch.
Braces   +21 added lines, -10 removed lines patch added patch discarded remove patch
@@ -161,7 +161,8 @@  discard block
 block discarded – undo
161 161
      */
162 162
     protected function sendRequest(string $method, string $url, array $form_params = array()) : ?\stdClass
163 163
     {
164
-        switch ($method) {
164
+        switch ($method)
165
+        {
165 166
               case 'GET':
166 167
                   $res = $this->http_request->getResponse($url);
167 168
                   break;
@@ -179,7 +180,8 @@  discard block
 block discarded – undo
179 180
             throw new ServerErrorException();
180 181
         }
181 182
         $response = json_decode($res->getBody());
182
-        if (empty($response)) {
183
+        if (empty($response))
184
+        {
183 185
             $this->logger->error('Request Body can not be decode', array('method' => $method, 'url' => $url, 'form_params' => $form_params));
184 186
             throw new ServerErrorException();
185 187
         }
@@ -216,14 +218,18 @@  discard block
 block discarded – undo
216 218
      */
217 219
     public function getConfiguration() : \stdClass
218 220
     {
219
-        try {
221
+        try
222
+        {
220 223
             $this->logger->debug('Start getting configuration');
221
-            if (is_null($this->configuration)) {
224
+            if (is_null($this->configuration))
225
+            {
222 226
                 $this->logger->debug('No configuration found, sending HTTP request to get it');
223 227
                 $this->configuration = $this->getRequest('configuration');
224 228
             }
225 229
             return $this->configuration;
226
-        } catch (TmdbException $ex) {
230
+        }
231
+        catch (TmdbException $ex)
232
+        {
227 233
             throw $ex;
228 234
         }
229 235
     }
@@ -242,8 +248,10 @@  discard block
 block discarded – undo
242 248
         // $params['include_adult'] = $this->include_adult;
243 249
         // $params['page']          = $this->page;
244 250
         // Check options
245
-        foreach ($options as $key => $value) {
246
-            switch ($key) {
251
+        foreach ($options as $key => $value)
252
+        {
253
+            switch ($key)
254
+            {
247 255
                 case 'year':
248 256
                     $params[$key] = $this->checkYear($value);
249 257
                     break;
@@ -291,7 +299,8 @@  discard block
 block discarded – undo
291 299
     private function checkLanguage(string $language) : string
292 300
     {
293 301
         $check = preg_match("#([a-z]{2})-([A-Z]{2})#", $language);
294
-        if ($check === 0 || $check === false) {
302
+        if ($check === 0 || $check === false)
303
+        {
295 304
             $this->logger->error('Incorrect language param option', array('language' => $language));
296 305
             throw new IncorrectParamException;
297 306
         }
@@ -306,7 +315,8 @@  discard block
 block discarded – undo
306 315
      */
307 316
     private function checkSort(string $direction) : string
308 317
     {
309
-        switch ($direction) {
318
+        switch ($direction)
319
+        {
310 320
             case 'asc':
311 321
             case 'desc':
312 322
                 break;
@@ -332,7 +342,8 @@  discard block
 block discarded – undo
332 342
      */
333 343
     public function __get(string $name) : string
334 344
     {
335
-        switch ($name) {
345
+        switch ($name)
346
+        {
336 347
             case 'url':
337 348
                 return $this->$name;
338 349
             default:
Please login to merge, or discard this patch.
src/VfacTmdb/Item.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
src/VfacTmdb/Traits/ListItems.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
src/VfacTmdb/Traits/Results/ShowTrait.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
src/VfacTmdb/Results/PeopleTVShowCast.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 /**
4 4
  * This file is part of the Tmdb package.
Please login to merge, or discard this patch.