@@ -47,7 +47,7 @@ discard block |
||
| 47 | 47 | |
| 48 | 48 | /** |
| 49 | 49 | * Crew |
| 50 | - * @return \Generator|Results\Crew |
|
| 50 | + * @return \Generator |
|
| 51 | 51 | */ |
| 52 | 52 | public function getCrew() : \Generator |
| 53 | 53 | { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * Cast |
| 64 | - * @return \Generator|Results\Cast |
|
| 64 | + * @return \Generator |
|
| 65 | 65 | */ |
| 66 | 66 | public function getCast() : \Generator |
| 67 | 67 | { |
@@ -15,7 +15,6 @@ |
||
| 15 | 15 | namespace VfacTmdb\Catalogs; |
| 16 | 16 | |
| 17 | 17 | use VfacTmdb\Interfaces\TmdbInterface; |
| 18 | - |
|
| 19 | 18 | use VfacTmdb\Exceptions\TmdbException; |
| 20 | 19 | |
| 21 | 20 | /** |
@@ -74,7 +74,8 @@ |
||
| 74 | 74 | $this->tmdb->checkOptionLanguage($options, $this->params); |
| 75 | 75 | |
| 76 | 76 | $this->data = $this->tmdb->getRequest($item_name . '/' . (int) $item_id, $this->params); |
| 77 | - } catch (TmdbException $ex) { |
|
| 77 | + } |
|
| 78 | + catch (TmdbException $ex) { |
|
| 78 | 79 | throw $ex; |
| 79 | 80 | } |
| 80 | 81 | } |
@@ -1,4 +1,4 @@ discard block |
||
| 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 | * |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $params['media_id'] = $media_id; |
| 110 | 110 | $params[$list_type] = $add; |
| 111 | 111 | |
| 112 | - $this->tmdb->postRequest('account/'.$this->account_id.'/'.$list_type, $this->options, $params); |
|
| 112 | + $this->tmdb->postRequest('account/' . $this->account_id . '/' . $list_type, $this->options, $params); |
|
| 113 | 113 | |
| 114 | 114 | return $this; |
| 115 | 115 | } catch (TmdbException $e) { |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $this->tmdb->checkOptionSortBy($this->options, $options); |
| 133 | 133 | $this->tmdb->checkOptionPage($this->options, $options); |
| 134 | 134 | |
| 135 | - $response = $this->tmdb->getRequest('account/'.$this->account_id.'/'.$list_type.'/'.$item, $options); |
|
| 135 | + $response = $this->tmdb->getRequest('account/' . $this->account_id . '/' . $list_type . '/' . $item, $options); |
|
| 136 | 136 | |
| 137 | 137 | $this->page = (int) $response->page; |
| 138 | 138 | $this->total_pages = (int) $response->total_pages; |
@@ -1,4 +1,4 @@ discard block |
||
| 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 | * |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | $options = []; |
| 78 | 78 | $this->tmdb->checkOptionLanguage($this->params, $options); |
| 79 | 79 | |
| 80 | - $data = $this->tmdb->getRequest($params->url, $options); |
|
| 80 | + $data = $this->tmdb->getRequest($params->url, $options); |
|
| 81 | 81 | |
| 82 | 82 | foreach ($data->$key as $b) { |
| 83 | 83 | $image = new Results\Image($this->tmdb, $this->id, $b); |
@@ -1,4 +1,4 @@ discard block |
||
| 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 | * |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | |
| 53 | 53 | $this->tmdb->checkOptionLanguage($options, $this->params); |
| 54 | 54 | |
| 55 | - $this->data = $this->tmdb->getRequest('person/' . $item_id . '/' . $item_type . '_credits', $this->params); |
|
| 55 | + $this->data = $this->tmdb->getRequest('person/' . $item_id . '/' . $item_type . '_credits', $this->params); |
|
| 56 | 56 | } catch (TmdbException $ex) { |
| 57 | 57 | throw $ex; |
| 58 | 58 | } |
@@ -53,7 +53,8 @@ |
||
| 53 | 53 | $this->tmdb->checkOptionLanguage($options, $this->params); |
| 54 | 54 | |
| 55 | 55 | $this->data = $this->tmdb->getRequest('person/' . $item_id . '/' . $item_type . '_credits', $this->params); |
| 56 | - } catch (TmdbException $ex) { |
|
| 56 | + } |
|
| 57 | + catch (TmdbException $ex) { |
|
| 57 | 58 | throw $ex; |
| 58 | 59 | } |
| 59 | 60 | } |
@@ -168,15 +168,15 @@ |
||
| 168 | 168 | try { |
| 169 | 169 | $res = new \stdClass(); |
| 170 | 170 | switch ($method) { |
| 171 | - case "GET": |
|
| 171 | + case "GET": |
|
| 172 | 172 | $res = $this->http_request->getResponse($url); |
| 173 | - break; |
|
| 174 | - case "POST": |
|
| 173 | + break; |
|
| 174 | + case "POST": |
|
| 175 | 175 | $res = $this->http_request->postResponse($url, [], $form_params); |
| 176 | - break; |
|
| 177 | - case "DELETE": |
|
| 176 | + break; |
|
| 177 | + case "DELETE": |
|
| 178 | 178 | $res = $this->http_request->deleteResponse($url); |
| 179 | - break; |
|
| 179 | + break; |
|
| 180 | 180 | } |
| 181 | 181 | $response = $this->decodeRequest($res, $method, $url, $form_params); |
| 182 | 182 | return $response; |
@@ -1,4 +1,4 @@ discard block |
||
| 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. |
@@ -181,7 +181,7 @@ discard block |
||
| 181 | 181 | $response = $this->decodeRequest($res, $method, $url, $form_params); |
| 182 | 182 | return $response; |
| 183 | 183 | } catch (TmdbException $e) { |
| 184 | - $this->logger->error('sendRequest failed : '.$e->getMessage(), array('method' => $method, 'url' => $url, 'form_params' => $form_params)); |
|
| 184 | + $this->logger->error('sendRequest failed : ' . $e->getMessage(), array('method' => $method, 'url' => $url, 'form_params' => $form_params)); |
|
| 185 | 185 | throw $e; |
| 186 | 186 | } |
| 187 | 187 | } |
@@ -347,7 +347,7 @@ discard block |
||
| 347 | 347 | default: |
| 348 | 348 | throw new IncorrectParamException; |
| 349 | 349 | } |
| 350 | - $return['sort_by'] = 'created_at.'.$options['sort_by']; |
|
| 350 | + $return['sort_by'] = 'created_at.' . $options['sort_by']; |
|
| 351 | 351 | } |
| 352 | 352 | } |
| 353 | 353 | |
@@ -180,7 +180,8 @@ discard block |
||
| 180 | 180 | } |
| 181 | 181 | $response = $this->decodeRequest($res, $method, $url, $form_params); |
| 182 | 182 | return $response; |
| 183 | - } catch (TmdbException $e) { |
|
| 183 | + } |
|
| 184 | + catch (TmdbException $e) { |
|
| 184 | 185 | $this->logger->error('sendRequest failed : '.$e->getMessage(), array('method' => $method, 'url' => $url, 'form_params' => $form_params)); |
| 185 | 186 | throw $e; |
| 186 | 187 | } |
@@ -245,7 +246,8 @@ discard block |
||
| 245 | 246 | $this->configuration = $this->getRequest('configuration'); |
| 246 | 247 | } |
| 247 | 248 | return $this->configuration; |
| 248 | - } catch (TmdbException $ex) { |
|
| 249 | + } |
|
| 250 | + catch (TmdbException $ex) { |
|
| 249 | 251 | throw $ex; |
| 250 | 252 | } |
| 251 | 253 | } |
@@ -1,4 +1,4 @@ discard block |
||
| 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 | * |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | $this->tmdb->checkOptionIncludeAdult($options, $params); |
| 80 | 80 | $this->tmdb->checkOptionYear($options, $params); |
| 81 | 81 | |
| 82 | - $response = $this->tmdb->getRequest('search/' . $item, $params); |
|
| 82 | + $response = $this->tmdb->getRequest('search/' . $item, $params); |
|
| 83 | 83 | |
| 84 | 84 | $this->page = (int) $response->page; |
| 85 | 85 | $this->total_pages = (int) $response->total_pages; |