@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | */ |
| 183 | 183 | public function getNetworks() |
| 184 | 184 | { |
| 185 | - if ( ! empty($this->data->networks)) |
|
| 185 | + if (!empty($this->data->networks)) |
|
| 186 | 186 | { |
| 187 | 187 | foreach ($this->data->networks as $network) |
| 188 | 188 | { |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | */ |
| 202 | 202 | public function getBackdrops() |
| 203 | 203 | { |
| 204 | - $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/'.(int) $this->id.'/images', null, $this->params); |
|
| 204 | + $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/' . (int) $this->id . '/images', null, $this->params); |
|
| 205 | 205 | |
| 206 | 206 | foreach ($data->backdrops as $b) |
| 207 | 207 | { |
@@ -216,7 +216,7 @@ discard block |
||
| 216 | 216 | */ |
| 217 | 217 | public function getPosters() |
| 218 | 218 | { |
| 219 | - $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/'.(int) $this->id.'/images', null, $this->params); |
|
| 219 | + $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/' . (int) $this->id . '/images', null, $this->params); |
|
| 220 | 220 | |
| 221 | 221 | foreach ($data->posters as $b) |
| 222 | 222 | { |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | */ |
| 232 | 232 | public function getSimilar() |
| 233 | 233 | { |
| 234 | - $similar = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/'.(int) $this->id.'/similar', null, $this->params); |
|
| 234 | + $similar = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/' . (int) $this->id . '/similar', null, $this->params); |
|
| 235 | 235 | |
| 236 | 236 | foreach ($similar->results as $t) |
| 237 | 237 | { |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | * |
| 11 | - |
|
| 12 | 11 | * @author Vincent Faliès <[email protected]> |
| 13 | 12 | * @copyright Copyright (c) 2017 |
| 14 | 13 | */ |
@@ -60,7 +60,8 @@ discard block |
||
| 60 | 60 | */ |
| 61 | 61 | public function getGenres() |
| 62 | 62 | { |
| 63 | - if (isset($this->data->genres)) { |
|
| 63 | + if (isset($this->data->genres)) |
|
| 64 | + { |
|
| 64 | 65 | return $this->data->genres; |
| 65 | 66 | } |
| 66 | 67 | return []; |
@@ -72,7 +73,8 @@ discard block |
||
| 72 | 73 | */ |
| 73 | 74 | public function getNote() |
| 74 | 75 | { |
| 75 | - if (isset($this->data->vote_average)) { |
|
| 76 | + if (isset($this->data->vote_average)) |
|
| 77 | + { |
|
| 76 | 78 | return $this->data->vote_average; |
| 77 | 79 | } |
| 78 | 80 | return 0; |
@@ -84,7 +86,8 @@ discard block |
||
| 84 | 86 | */ |
| 85 | 87 | public function getNumberEpisodes() |
| 86 | 88 | { |
| 87 | - if (isset($this->data->number_of_episodes)) { |
|
| 89 | + if (isset($this->data->number_of_episodes)) |
|
| 90 | + { |
|
| 88 | 91 | return $this->data->number_of_episodes; |
| 89 | 92 | } |
| 90 | 93 | return 0; |
@@ -96,7 +99,8 @@ discard block |
||
| 96 | 99 | */ |
| 97 | 100 | public function getNumberSeasons() |
| 98 | 101 | { |
| 99 | - if (isset($this->data->number_of_seasons)) { |
|
| 102 | + if (isset($this->data->number_of_seasons)) |
|
| 103 | + { |
|
| 100 | 104 | return $this->data->number_of_seasons; |
| 101 | 105 | } |
| 102 | 106 | return 0; |
@@ -108,7 +112,8 @@ discard block |
||
| 108 | 112 | */ |
| 109 | 113 | public function getOriginalTitle() |
| 110 | 114 | { |
| 111 | - if (isset($this->data->original_name)) { |
|
| 115 | + if (isset($this->data->original_name)) |
|
| 116 | + { |
|
| 112 | 117 | return $this->data->original_name; |
| 113 | 118 | } |
| 114 | 119 | return ''; |
@@ -120,7 +125,8 @@ discard block |
||
| 120 | 125 | */ |
| 121 | 126 | public function getOverview() |
| 122 | 127 | { |
| 123 | - if (isset($this->data->overview)) { |
|
| 128 | + if (isset($this->data->overview)) |
|
| 129 | + { |
|
| 124 | 130 | return $this->data->overview; |
| 125 | 131 | } |
| 126 | 132 | return ''; |
@@ -132,7 +138,8 @@ discard block |
||
| 132 | 138 | */ |
| 133 | 139 | public function getReleaseDate() |
| 134 | 140 | { |
| 135 | - if (isset($this->data->first_air_date)) { |
|
| 141 | + if (isset($this->data->first_air_date)) |
|
| 142 | + { |
|
| 136 | 143 | return $this->data->first_air_date; |
| 137 | 144 | } |
| 138 | 145 | return ''; |
@@ -144,7 +151,8 @@ discard block |
||
| 144 | 151 | */ |
| 145 | 152 | public function getStatus() |
| 146 | 153 | { |
| 147 | - if (isset($this->data->status)) { |
|
| 154 | + if (isset($this->data->status)) |
|
| 155 | + { |
|
| 148 | 156 | return $this->data->status; |
| 149 | 157 | } |
| 150 | 158 | return ''; |
@@ -156,7 +164,8 @@ discard block |
||
| 156 | 164 | */ |
| 157 | 165 | public function getTitle() |
| 158 | 166 | { |
| 159 | - if (isset($this->data->name)) { |
|
| 167 | + if (isset($this->data->name)) |
|
| 168 | + { |
|
| 160 | 169 | return $this->data->name; |
| 161 | 170 | } |
| 162 | 171 | return ''; |
@@ -168,8 +177,10 @@ discard block |
||
| 168 | 177 | */ |
| 169 | 178 | public function getSeasons() |
| 170 | 179 | { |
| 171 | - if (!empty($this->data->seasons)) { |
|
| 172 | - foreach ($this->data->seasons as $season) { |
|
| 180 | + if (!empty($this->data->seasons)) |
|
| 181 | + { |
|
| 182 | + foreach ($this->data->seasons as $season) |
|
| 183 | + { |
|
| 173 | 184 | $season = new \vfalies\tmdb\Results\TVSeason($this->tmdb, $season); |
| 174 | 185 | yield $season; |
| 175 | 186 | } |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function extractConfig(array $builderConfig) |
| 93 | 93 | { |
| 94 | - return isset($builderConfig['config']) ? $builderConfig['config']:[]; |
|
| 94 | + return isset($builderConfig['config']) ? $builderConfig['config'] : []; |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | */ |
| 103 | 103 | public function checkDependency(BuilderInterface $builder) |
| 104 | 104 | { |
| 105 | - if (! class_exists($builder->getMainClassName())) { |
|
| 105 | + if (!class_exists($builder->getMainClassName())) { |
|
| 106 | 106 | $message = "missing {$builder->getPackageName()}, please install it using composer : composer require {$builder->getPackageName()}"; |
| 107 | 107 | throw new MissingDependencyException($message); |
| 108 | 108 | } |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | /** |
| 37 | 37 | * Create |
| 38 | 38 | * @param array $loggerConf |
| 39 | - * @return \static |
|
| 39 | + * @return Factory |
|
| 40 | 40 | */ |
| 41 | 41 | public static function create($loggerConf = ['builder' => 'NullLogger', 'config' => []]) |
| 42 | 42 | { |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * Get Tmdb object |
| 51 | 51 | * @param string $api_key API Key |
| 52 | 52 | * @param int $version API Version (not yet used) |
| 53 | - * @return TmdbInterface |
|
| 53 | + * @return Tmdb |
|
| 54 | 54 | */ |
| 55 | 55 | public function getTmdb($api_key, $version = 3) |
| 56 | 56 | { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * Get Builder |
| 62 | 62 | * @param string $builder |
| 63 | 63 | * @param array $args |
| 64 | - * @return type |
|
| 64 | + * @return LoggerBuilderInterface |
|
| 65 | 65 | */ |
| 66 | 66 | public function getBuilder($builder, array $args = []) |
| 67 | 67 | { |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | * |
| 11 | - |
|
| 12 | 11 | * @author Vincent Faliès <[email protected]> |
| 13 | 12 | * @copyright Copyright (c) 2017 |
| 14 | 13 | */ |
@@ -102,7 +102,8 @@ |
||
| 102 | 102 | */ |
| 103 | 103 | public function checkDependency(BuilderInterface $builder) |
| 104 | 104 | { |
| 105 | - if (! class_exists($builder->getMainClassName())) { |
|
| 105 | + if (! class_exists($builder->getMainClassName())) |
|
| 106 | + { |
|
| 106 | 107 | $message = "missing {$builder->getPackageName()}, please install it using composer : composer require {$builder->getPackageName()}"; |
| 107 | 108 | throw new MissingDependencyException($message); |
| 108 | 109 | } |
@@ -65,7 +65,7 @@ |
||
| 65 | 65 | */ |
| 66 | 66 | public function getBuilder($builder, array $args = []) |
| 67 | 67 | { |
| 68 | - $class = "\\vfalies\\tmdb\\Factory\\Builder\\{$builder}Builder"; |
|
| 68 | + $class = "\\vfalies\\tmdb\\Factory\\Builder\\{$builder}builder"; |
|
| 69 | 69 | |
| 70 | 70 | $reflection = new \ReflectionClass($class); |
| 71 | 71 | |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | */ |
| 30 | 30 | public function getCrew() |
| 31 | 31 | { |
| 32 | - if ( ! empty($this->data->crew)) |
|
| 32 | + if (!empty($this->data->crew)) |
|
| 33 | 33 | { |
| 34 | 34 | foreach ($this->data->crew as $crew) |
| 35 | 35 | { |
@@ -7,7 +7,6 @@ discard block |
||
| 7 | 7 | * For the full copyright and license information, please view the LICENSE |
| 8 | 8 | * file that was distributed with this source code. |
| 9 | 9 | * |
| 10 | - |
|
| 11 | 10 | * @author Vincent Faliès <[email protected]> |
| 12 | 11 | * @copyright Copyright (c) 2017 |
| 13 | 12 | */ |
@@ -49,10 +48,10 @@ discard block |
||
| 49 | 48 | */ |
| 50 | 49 | protected $title; |
| 51 | 50 | |
| 52 | - /** |
|
| 53 | - * Get show ID |
|
| 54 | - * @return int |
|
| 55 | - */ |
|
| 51 | + /** |
|
| 52 | + * Get show ID |
|
| 53 | + * @return int |
|
| 54 | + */ |
|
| 56 | 55 | public function getId() |
| 57 | 56 | { |
| 58 | 57 | return (int) $this->id; |
@@ -32,22 +32,22 @@ discard block |
||
| 32 | 32 | * Adult |
| 33 | 33 | * @var string |
| 34 | 34 | */ |
| 35 | - protected $adult = null; |
|
| 35 | + protected $adult = null; |
|
| 36 | 36 | /** |
| 37 | 37 | * People known for |
| 38 | 38 | * @var array |
| 39 | 39 | */ |
| 40 | - protected $known_for = null; |
|
| 40 | + protected $known_for = null; |
|
| 41 | 41 | /** |
| 42 | 42 | * People name |
| 43 | 43 | * @var string |
| 44 | 44 | */ |
| 45 | - protected $name = null; |
|
| 45 | + protected $name = null; |
|
| 46 | 46 | /** |
| 47 | 47 | * Popularity |
| 48 | 48 | * @var int |
| 49 | 49 | */ |
| 50 | - protected $popularity = null; |
|
| 50 | + protected $popularity = null; |
|
| 51 | 51 | /** |
| 52 | 52 | * Image profile path |
| 53 | 53 | * @var string |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | * Id |
| 58 | 58 | * @var int |
| 59 | 59 | */ |
| 60 | - protected $id = null; |
|
| 60 | + protected $id = null; |
|
| 61 | 61 | |
| 62 | 62 | /** |
| 63 | 63 | * Constructor |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | * |
| 11 | - |
|
| 12 | 11 | * @author Vincent Faliès <[email protected]> |
| 13 | 12 | * @copyright Copyright (c) 2017 |
| 14 | 13 | */ |
@@ -37,37 +37,37 @@ discard block |
||
| 37 | 37 | * Episode number |
| 38 | 38 | * @var int |
| 39 | 39 | */ |
| 40 | - protected $episode_number = 0; |
|
| 40 | + protected $episode_number = 0; |
|
| 41 | 41 | /** |
| 42 | 42 | * Name |
| 43 | 43 | * @var string |
| 44 | 44 | */ |
| 45 | - protected $name = ''; |
|
| 45 | + protected $name = ''; |
|
| 46 | 46 | /** |
| 47 | 47 | * Air date |
| 48 | 48 | * @var string |
| 49 | 49 | */ |
| 50 | - protected $air_date = null; |
|
| 50 | + protected $air_date = null; |
|
| 51 | 51 | /** |
| 52 | 52 | * Season number |
| 53 | 53 | * @var int |
| 54 | 54 | */ |
| 55 | - protected $season_number = 0; |
|
| 55 | + protected $season_number = 0; |
|
| 56 | 56 | /** |
| 57 | 57 | * Vote average |
| 58 | 58 | * @var float |
| 59 | 59 | */ |
| 60 | - protected $vote_average = 0; |
|
| 60 | + protected $vote_average = 0; |
|
| 61 | 61 | /** |
| 62 | 62 | * Vote count |
| 63 | 63 | * @var int |
| 64 | 64 | */ |
| 65 | - protected $vote_count = 0; |
|
| 65 | + protected $vote_count = 0; |
|
| 66 | 66 | /** |
| 67 | 67 | * Overview |
| 68 | 68 | * @var string |
| 69 | 69 | */ |
| 70 | - protected $overview = ''; |
|
| 70 | + protected $overview = ''; |
|
| 71 | 71 | /** |
| 72 | 72 | * Production code |
| 73 | 73 | * @var string |
@@ -77,12 +77,12 @@ discard block |
||
| 77 | 77 | * Image still path |
| 78 | 78 | * @var string |
| 79 | 79 | */ |
| 80 | - protected $still_path = ''; |
|
| 80 | + protected $still_path = ''; |
|
| 81 | 81 | /** |
| 82 | 82 | * Id |
| 83 | 83 | * @var int |
| 84 | 84 | */ |
| 85 | - protected $id = null; |
|
| 85 | + protected $id = null; |
|
| 86 | 86 | /** |
| 87 | 87 | * Guest stars |
| 88 | 88 | * @var array |
@@ -33,12 +33,12 @@ |
||
| 33 | 33 | * Image poster path |
| 34 | 34 | * @var string |
| 35 | 35 | */ |
| 36 | - protected $poster_path = null; |
|
| 36 | + protected $poster_path = null; |
|
| 37 | 37 | /** |
| 38 | 38 | * Image backdrop path |
| 39 | 39 | * @var string |
| 40 | 40 | */ |
| 41 | - protected $backdrop_path = null; |
|
| 41 | + protected $backdrop_path = null; |
|
| 42 | 42 | |
| 43 | 43 | use ElementTrait; |
| 44 | 44 | use ShowTrait; |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | * |
| 11 | - |
|
| 12 | 11 | * @author Vincent Faliès <[email protected]> |
| 13 | 12 | * @copyright Copyright (c) 2017 |
| 14 | 13 | */ |
@@ -31,27 +31,27 @@ discard block |
||
| 31 | 31 | * Department |
| 32 | 32 | * @var string |
| 33 | 33 | */ |
| 34 | - protected $department = null; |
|
| 34 | + protected $department = null; |
|
| 35 | 35 | /** |
| 36 | 36 | * Gender |
| 37 | 37 | * @var string |
| 38 | 38 | */ |
| 39 | - protected $gender = null; |
|
| 39 | + protected $gender = null; |
|
| 40 | 40 | /** |
| 41 | 41 | * Credit id |
| 42 | 42 | * @var string |
| 43 | 43 | */ |
| 44 | - protected $credit_id = null; |
|
| 44 | + protected $credit_id = null; |
|
| 45 | 45 | /** |
| 46 | 46 | * Job |
| 47 | 47 | * @var string |
| 48 | 48 | */ |
| 49 | - protected $job = null; |
|
| 49 | + protected $job = null; |
|
| 50 | 50 | /** |
| 51 | 51 | * Name |
| 52 | 52 | * @var string |
| 53 | 53 | */ |
| 54 | - protected $name = null; |
|
| 54 | + protected $name = null; |
|
| 55 | 55 | /** |
| 56 | 56 | * Image profile path |
| 57 | 57 | * @var string |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | * Id |
| 62 | 62 | * @var int |
| 63 | 63 | */ |
| 64 | - protected $id = null; |
|
| 64 | + protected $id = null; |
|
| 65 | 65 | |
| 66 | 66 | /** |
| 67 | 67 | * Constructor |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | * |
| 11 | - |
|
| 12 | 11 | * @author Vincent Faliès <[email protected]> |
| 13 | 12 | * @copyright Copyright (c) 2017 |
| 14 | 13 | */ |
@@ -45,17 +45,17 @@ |
||
| 45 | 45 | * Image poster path |
| 46 | 46 | * @var string |
| 47 | 47 | */ |
| 48 | - protected $poster_path = null; |
|
| 48 | + protected $poster_path = null; |
|
| 49 | 49 | /** |
| 50 | 50 | * Air date |
| 51 | 51 | * @var string |
| 52 | 52 | */ |
| 53 | - protected $air_date = null; |
|
| 53 | + protected $air_date = null; |
|
| 54 | 54 | /** |
| 55 | 55 | * Id |
| 56 | 56 | * @var int |
| 57 | 57 | */ |
| 58 | - protected $id = null; |
|
| 58 | + protected $id = null; |
|
| 59 | 59 | |
| 60 | 60 | /** |
| 61 | 61 | * Constructor |
@@ -8,7 +8,6 @@ |
||
| 8 | 8 | * For the full copyright and license information, please view the LICENSE |
| 9 | 9 | * file that was distributed with this source code. |
| 10 | 10 | * |
| 11 | - |
|
| 12 | 11 | * @author Vincent Faliès <[email protected]> |
| 13 | 12 | * @copyright Copyright (c) 2017 |
| 14 | 13 | */ |