@@ -82,7 +82,6 @@ |
||
| 82 | 82 | return $this->markAsFavorite('movie', $movie_id, true); |
| 83 | 83 | } |
| 84 | 84 | /** |
| 85 | - |
|
| 86 | 85 | * Unmark a movie as favorite |
| 87 | 86 | * @param int $movie_id Movie id |
| 88 | 87 | * @return Favorite |
@@ -65,7 +65,8 @@ |
||
| 65 | 65 | $this->tmdb->postRequest('account/'.$this->account_id.'/favorite', $this->options, $params); |
| 66 | 66 | |
| 67 | 67 | return $this; |
| 68 | - } catch (TmdbException $e) { |
|
| 68 | + } |
|
| 69 | + catch (TmdbException $e) { |
|
| 69 | 70 | throw $e; |
| 70 | 71 | } |
| 71 | 72 | } |
@@ -121,11 +121,11 @@ |
||
| 121 | 121 | public function __get(string $name) |
| 122 | 122 | { |
| 123 | 123 | switch ($name) { |
| 124 | - case 'request_token': |
|
| 124 | + case 'request_token': |
|
| 125 | 125 | case 'session_id': |
| 126 | 126 | return $this->$name; |
| 127 | - default: |
|
| 127 | + default: |
|
| 128 | 128 | throw new NotFoundException(); |
| 129 | - } |
|
| 129 | + } |
|
| 130 | 130 | } |
| 131 | 131 | } |
@@ -167,15 +167,15 @@ |
||
| 167 | 167 | { |
| 168 | 168 | $res = new \stdClass(); |
| 169 | 169 | switch ($method) { |
| 170 | - case 'GET': |
|
| 170 | + case 'GET': |
|
| 171 | 171 | $res = $this->http_request->getResponse($url); |
| 172 | - break; |
|
| 173 | - case 'POST': |
|
| 172 | + break; |
|
| 173 | + case 'POST': |
|
| 174 | 174 | $res = $this->http_request->postResponse($url, [], $form_params); |
| 175 | - break; |
|
| 176 | - case 'DELETE': |
|
| 175 | + break; |
|
| 176 | + case 'DELETE': |
|
| 177 | 177 | $res = $this->http_request->deleteResponse($url); |
| 178 | - break; |
|
| 178 | + break; |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | if (empty($res->getBody())) { |
@@ -227,7 +227,8 @@ |
||
| 227 | 227 | $this->configuration = $this->getRequest('configuration'); |
| 228 | 228 | } |
| 229 | 229 | return $this->configuration; |
| 230 | - } catch (TmdbException $ex) { |
|
| 230 | + } |
|
| 231 | + catch (TmdbException $ex) { |
|
| 231 | 232 | throw $ex; |
| 232 | 233 | } |
| 233 | 234 | } |
@@ -77,7 +77,8 @@ |
||
| 77 | 77 | $this->tmdb->postRequest('account/'.$this->account_id.'/watchlist', $this->options, $params); |
| 78 | 78 | |
| 79 | 79 | return $this; |
| 80 | - } catch (TmdbException $e) { |
|
| 80 | + } |
|
| 81 | + catch (TmdbException $e) { |
|
| 81 | 82 | throw $e; |
| 82 | 83 | } |
| 83 | 84 | } |
@@ -156,7 +156,8 @@ discard block |
||
| 156 | 156 | $this->tmdb->postRequest($action, $this->options, $params); |
| 157 | 157 | |
| 158 | 158 | return $this; |
| 159 | - } catch (TmdbException $e) { |
|
| 159 | + } |
|
| 160 | + catch (TmdbException $e) { |
|
| 160 | 161 | throw $e; |
| 161 | 162 | } |
| 162 | 163 | } |
@@ -172,7 +173,8 @@ discard block |
||
| 172 | 173 | $this->tmdb->deleteRequest($action, $this->options); |
| 173 | 174 | |
| 174 | 175 | return $this; |
| 175 | - } catch (TmdbException $e) { |
|
| 176 | + } |
|
| 177 | + catch (TmdbException $e) { |
|
| 176 | 178 | throw $e; |
| 177 | 179 | } |
| 178 | 180 | } |
@@ -53,7 +53,8 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | try { |
| 55 | 55 | return $this->getList('genre/movie/list', $options); |
| 56 | - } catch (TmdbException $ex) { |
|
| 56 | + } |
|
| 57 | + catch (TmdbException $ex) { |
|
| 57 | 58 | throw $ex; |
| 58 | 59 | } |
| 59 | 60 | } |
@@ -68,7 +69,8 @@ discard block |
||
| 68 | 69 | { |
| 69 | 70 | try { |
| 70 | 71 | return $this->getList('genre/tv/list', $options); |
| 71 | - } catch (TmdbException $ex) { |
|
| 72 | + } |
|
| 73 | + catch (TmdbException $ex) { |
|
| 72 | 74 | throw $ex; |
| 73 | 75 | } |
| 74 | 76 | } |
@@ -92,7 +94,8 @@ discard block |
||
| 92 | 94 | } |
| 93 | 95 | |
| 94 | 96 | return $this->genreItemGenerator($genres); |
| 95 | - } catch (TmdbException $ex) { |
|
| 97 | + } |
|
| 98 | + catch (TmdbException $ex) { |
|
| 96 | 99 | throw $ex; |
| 97 | 100 | } |
| 98 | 101 | } |
@@ -64,7 +64,8 @@ |
||
| 64 | 64 | $results[] = $result; |
| 65 | 65 | } |
| 66 | 66 | } |
| 67 | - } catch (TmdbException $ex) { |
|
| 67 | + } |
|
| 68 | + catch (TmdbException $ex) { |
|
| 68 | 69 | throw $ex; |
| 69 | 70 | } |
| 70 | 71 | return $this->genreItemGenerator($results); |
@@ -42,7 +42,8 @@ |
||
| 42 | 42 | $this->logger = $tmdb->getLogger(); |
| 43 | 43 | $this->params = $this->tmdb->checkOptions($options); |
| 44 | 44 | $this->data = $this->tmdb->getRequest('person/' . $people_id.'/tv_credits', $this->params); |
| 45 | - } catch (TmdbException $ex) { |
|
| 45 | + } |
|
| 46 | + catch (TmdbException $ex) { |
|
| 46 | 47 | throw $ex; |
| 47 | 48 | } |
| 48 | 49 | } |
@@ -42,7 +42,8 @@ |
||
| 42 | 42 | $this->logger = $tmdb->getLogger(); |
| 43 | 43 | $this->params = $this->tmdb->checkOptions($options); |
| 44 | 44 | $this->data = $this->tmdb->getRequest('person/' . $people_id.'/movie_credits', $this->params); |
| 45 | - } catch (TmdbException $ex) { |
|
| 45 | + } |
|
| 46 | + catch (TmdbException $ex) { |
|
| 46 | 47 | throw $ex; |
| 47 | 48 | } |
| 48 | 49 | } |