@@ -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; |
@@ -65,7 +65,7 @@ |
||
65 | 65 | */ |
66 | 66 | public function getBuilder(string $builder, array $args = []) : LoggerBuilderInterface |
67 | 67 | { |
68 | - $class = "\\VfacTmdb\\Factory\\Builder\\{$builder}Builder"; |
|
68 | + $class = "\\VfacTmdb\\Factory\\Builder\\{$builder}builder"; |
|
69 | 69 | |
70 | 70 | $reflection = new \ReflectionClass($class); |
71 | 71 |
@@ -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 | } |
@@ -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 | } |
@@ -26,17 +26,17 @@ |
||
26 | 26 | * @author Vincent Faliès <[email protected]> |
27 | 27 | * @copyright Copyright (c) 2017 |
28 | 28 | */ |
29 | - class PeopleTVShowCredit extends PeopleItemCredit |
|
30 | - { |
|
31 | - public function __construct(TmdbInterface $tmdb, int $people_id, array $options = array()) |
|
32 | - { |
|
33 | - try { |
|
34 | - $this->crew_class = PeopleTVShowCrew::class; |
|
35 | - $this->cast_class = PeopleTVShowCast::class; |
|
29 | + class PeopleTVShowCredit extends PeopleItemCredit |
|
30 | + { |
|
31 | + public function __construct(TmdbInterface $tmdb, int $people_id, array $options = array()) |
|
32 | + { |
|
33 | + try { |
|
34 | + $this->crew_class = PeopleTVShowCrew::class; |
|
35 | + $this->cast_class = PeopleTVShowCast::class; |
|
36 | 36 | |
37 | - parent::__construct($tmdb, 'tv', $people_id, $options); |
|
38 | - } catch (TmdbException $ex) { |
|
39 | - throw $ex; |
|
40 | - } |
|
41 | - } |
|
42 | - } |
|
37 | + parent::__construct($tmdb, 'tv', $people_id, $options); |
|
38 | + } catch (TmdbException $ex) { |
|
39 | + throw $ex; |
|
40 | + } |
|
41 | + } |
|
42 | + } |
@@ -56,7 +56,6 @@ |
||
56 | 56 | return $this->setListItem('favorite', 'movie', $movie_id, true); |
57 | 57 | } |
58 | 58 | /** |
59 | - |
|
60 | 59 | * Unmark a movie as favorite |
61 | 60 | * @param int $movie_id Movie id |
62 | 61 | * @return Favorite |
@@ -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 | /** |
@@ -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); |