@@ -58,7 +58,7 @@ |
||
58 | 58 | */ |
59 | 59 | public function __construct(TmdbInterface $tmdb, int $tv_id, int $season_number, int $episode_number, array $options = array()) |
60 | 60 | { |
61 | - parent::__construct($tmdb, $episode_number, $options, 'tv/' . $tv_id . '/season/' . $season_number.'/episode'); |
|
61 | + parent::__construct($tmdb, $episode_number, $options, 'tv/' . $tv_id . '/season/' . $season_number . '/episode'); |
|
62 | 62 | |
63 | 63 | $this->season_number = $season_number; |
64 | 64 | $this->episode_number = $episode_number; |
@@ -93,7 +93,7 @@ |
||
93 | 93 | */ |
94 | 94 | private function checkSearchItemOption(array $options) : array |
95 | 95 | { |
96 | - $params = []; |
|
96 | + $params = []; |
|
97 | 97 | $this->tmdb->checkOptionQuery($options, $params); |
98 | 98 | $this->tmdb->checkOptionPage($options, $params); |
99 | 99 | $this->tmdb->checkOptionLanguage($options, $params); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | */ |
63 | 63 | public function addMovieRate(int $movie_id, float $rate) : Rated |
64 | 64 | { |
65 | - return $this->addRate('movie/'.$movie_id.'/rating', $rate); |
|
65 | + return $this->addRate('movie/' . $movie_id . '/rating', $rate); |
|
66 | 66 | } |
67 | 67 | |
68 | 68 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | */ |
73 | 73 | public function removeMovieRate(int $movie_id) : Rated |
74 | 74 | { |
75 | - return $this->removeRate('movie/'.$movie_id.'/rating'); |
|
75 | + return $this->removeRate('movie/' . $movie_id . '/rating'); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | /** |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | */ |
84 | 84 | public function addTVShowRate(int $tv_id, float $rate) : Rated |
85 | 85 | { |
86 | - return $this->addRate('tv/'.$tv_id.'/rating', $rate); |
|
86 | + return $this->addRate('tv/' . $tv_id . '/rating', $rate); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | /** |
@@ -93,7 +93,7 @@ discard block |
||
93 | 93 | */ |
94 | 94 | public function removeTVShowRate(int $tv_id) : Rated |
95 | 95 | { |
96 | - return $this->removeRate('tv/'.$tv_id.'/rating'); |
|
96 | + return $this->removeRate('tv/' . $tv_id . '/rating'); |
|
97 | 97 | } |
98 | 98 | |
99 | 99 | /** |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | */ |
107 | 107 | public function addTVShowEpisodeRate(int $tv_id, int $season_number, int $episode_number, float $rate) : Rated |
108 | 108 | { |
109 | - return $this->addRate('tv/'.$tv_id.'/season/'.$season_number.'/episode/'.$episode_number.'/rating', $rate); |
|
109 | + return $this->addRate('tv/' . $tv_id . '/season/' . $season_number . '/episode/' . $episode_number . '/rating', $rate); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | /** |
@@ -118,7 +118,7 @@ discard block |
||
118 | 118 | */ |
119 | 119 | public function removeTVShowEpisodeRate(int $tv_id, int $season_number, int $episode_number) : Rated |
120 | 120 | { |
121 | - return $this->removeRate('tv/'.$tv_id.'/season/'.$season_number.'/episode/'.$episode_number.'/rating'); |
|
121 | + return $this->removeRate('tv/' . $tv_id . '/season/' . $season_number . '/episode/' . $episode_number . '/rating'); |
|
122 | 122 | } |
123 | 123 | |
124 | 124 | /** |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | * Session Id |
48 | 48 | * @var string |
49 | 49 | */ |
50 | - private $session_id = null; |
|
50 | + private $session_id = null; |
|
51 | 51 | |
52 | 52 | /** |
53 | 53 | * Constructor |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | if (!isset($data->success) || $data->success != 'true' || !isset($data->request_token)) { |
90 | 90 | throw new InvalidResponseException("Getting request token failed"); |
91 | 91 | } |
92 | - $this->request_token = $data->request_token; |
|
92 | + $this->request_token = $data->request_token; |
|
93 | 93 | |
94 | 94 | return $this->request_token; |
95 | 95 | } |
@@ -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; |
@@ -77,7 +77,7 @@ |
||
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); |
@@ -52,7 +52,7 @@ |
||
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 | } |
@@ -149,12 +149,12 @@ discard block |
||
149 | 149 | { |
150 | 150 | try { |
151 | 151 | $res = new \stdClass(); |
152 | - $method_name = strtolower($method).'Response'; |
|
152 | + $method_name = strtolower($method) . 'Response'; |
|
153 | 153 | $res = $this->http_request->$method_name($url, [], $form_params); |
154 | 154 | $response = $this->decodeRequest($res, $method, $url, $form_params); |
155 | 155 | return $response; |
156 | 156 | } catch (TmdbException $e) { |
157 | - $this->logger->error('sendRequest failed : '.$e->getMessage(), array('method' => $method, 'url' => $url, 'form_params' => $form_params)); |
|
157 | + $this->logger->error('sendRequest failed : ' . $e->getMessage(), array('method' => $method, 'url' => $url, 'form_params' => $form_params)); |
|
158 | 158 | throw $e; |
159 | 159 | } |
160 | 160 | } |
@@ -326,7 +326,7 @@ discard block |
||
326 | 326 | default: |
327 | 327 | throw new IncorrectParamException; |
328 | 328 | } |
329 | - $return['sort_by'] = 'created_at.'.$options['sort_by']; |
|
329 | + $return['sort_by'] = 'created_at.' . $options['sort_by']; |
|
330 | 330 | } |
331 | 331 | } |
332 | 332 |