@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * Logger |
| 79 | 79 | * @var LoggerInterface |
| 80 | 80 | */ |
| 81 | - public $logger = null; |
|
| 81 | + public $logger = null; |
|
| 82 | 82 | |
| 83 | 83 | /** |
| 84 | 84 | * API Version |
@@ -132,12 +132,12 @@ discard block |
||
| 132 | 132 | private function buildHTTPUrl($action, $query, $options) |
| 133 | 133 | { |
| 134 | 134 | // Url construction |
| 135 | - $url = $this->base_api_url.$action; |
|
| 135 | + $url = $this->base_api_url . $action; |
|
| 136 | 136 | |
| 137 | 137 | // Parameters |
| 138 | 138 | $params = []; |
| 139 | 139 | $params['api_key'] = $this->api_key; |
| 140 | - if ( ! is_null($query)) |
|
| 140 | + if (!is_null($query)) |
|
| 141 | 141 | { |
| 142 | 142 | $params['query'] = $query; |
| 143 | 143 | } |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | $params = array_merge($params, $options); |
| 146 | 146 | |
| 147 | 147 | // URL with paramters construction |
| 148 | - $url = $url.'?'.http_build_query($params); |
|
| 148 | + $url = $url . '?' . http_build_query($params); |
|
| 149 | 149 | |
| 150 | 150 | return $url; |
| 151 | 151 | } |
@@ -31,12 +31,12 @@ discard block |
||
| 31 | 31 | * id |
| 32 | 32 | * @var int |
| 33 | 33 | */ |
| 34 | - protected $id = null; |
|
| 34 | + protected $id = null; |
|
| 35 | 35 | /** |
| 36 | 36 | * Tmdb object |
| 37 | 37 | * @var Tmdb |
| 38 | 38 | */ |
| 39 | - protected $tmdb = null; |
|
| 39 | + protected $tmdb = null; |
|
| 40 | 40 | /** |
| 41 | 41 | * Logger |
| 42 | 42 | * @var LoggerInterface |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * Configuration |
| 47 | 47 | * @var \stdClass |
| 48 | 48 | */ |
| 49 | - protected $conf = null; |
|
| 49 | + protected $conf = null; |
|
| 50 | 50 | /** |
| 51 | 51 | * Params |
| 52 | 52 | * @var array |
@@ -56,7 +56,7 @@ discard block |
||
| 56 | 56 | * Data |
| 57 | 57 | * @var \stdClass |
| 58 | 58 | */ |
| 59 | - protected $data = null; |
|
| 59 | + protected $data = null; |
|
| 60 | 60 | |
| 61 | 61 | /** |
| 62 | 62 | * Constructor |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | $this->logger = $tmdb->logger; |
| 76 | 76 | $this->conf = $this->tmdb->getConfiguration(); |
| 77 | 77 | $this->params = $this->tmdb->checkOptions($options); |
| 78 | - $this->data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), $item_name.'/'.(int) $item_id, null, $this->params); |
|
| 78 | + $this->data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), $item_name . '/' . (int) $item_id, null, $this->params); |
|
| 79 | 79 | } |
| 80 | 80 | catch (TmdbException $ex) |
| 81 | 81 | { |
@@ -36,22 +36,22 @@ discard block |
||
| 36 | 36 | * Logger object |
| 37 | 37 | * @var LoggerInterface |
| 38 | 38 | */ |
| 39 | - protected $logger = null; |
|
| 39 | + protected $logger = null; |
|
| 40 | 40 | /** |
| 41 | 41 | * Configuration array |
| 42 | 42 | * @var \stdClass |
| 43 | 43 | */ |
| 44 | - protected $conf = null; |
|
| 44 | + protected $conf = null; |
|
| 45 | 45 | /** |
| 46 | 46 | * Tmdb object |
| 47 | 47 | * @var \vfalies\tmdb\Tmdb |
| 48 | 48 | */ |
| 49 | - protected $tmdb = null; |
|
| 49 | + protected $tmdb = null; |
|
| 50 | 50 | /** |
| 51 | 51 | * Data object |
| 52 | 52 | * @var \stdClass |
| 53 | 53 | */ |
| 54 | - protected $data = null; |
|
| 54 | + protected $data = null; |
|
| 55 | 55 | |
| 56 | 56 | /** |
| 57 | 57 | * Constructor |
@@ -67,7 +67,7 @@ discard block |
||
| 67 | 67 | $properties = get_object_vars($this); |
| 68 | 68 | foreach (array_keys($properties) as $property) |
| 69 | 69 | { |
| 70 | - if ( ! in_array($property, $this->property_blacklist) && ! property_exists($result, $property)) |
|
| 70 | + if (!in_array($property, $this->property_blacklist) && !property_exists($result, $property)) |
|
| 71 | 71 | { |
| 72 | 72 | throw new NotFoundException($property); |
| 73 | 73 | } |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | * Tmdb object |
| 32 | 32 | * @var Tmdb |
| 33 | 33 | */ |
| 34 | - private $tmdb = null; |
|
| 34 | + private $tmdb = null; |
|
| 35 | 35 | /** |
| 36 | 36 | * Logger |
| 37 | 37 | * @var LoggerInterface |
@@ -42,7 +42,7 @@ |
||
| 42 | 42 | */ |
| 43 | 43 | public function __construct(TmdbInterface $tmdb, $movie_id, array $options = array()) |
| 44 | 44 | { |
| 45 | - parent::__construct($tmdb, '/credits', $options, 'movie/'.$movie_id); |
|
| 45 | + parent::__construct($tmdb, '/credits', $options, 'movie/' . $movie_id); |
|
| 46 | 46 | } |
| 47 | 47 | |
| 48 | 48 | /** |
@@ -222,7 +222,7 @@ |
||
| 222 | 222 | */ |
| 223 | 223 | public function getProfiles() |
| 224 | 224 | { |
| 225 | - $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/person/'.(int) $this->id.'/images', null, $this->params); |
|
| 225 | + $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/person/' . (int) $this->id . '/images', null, $this->params); |
|
| 226 | 226 | |
| 227 | 227 | foreach ($data->profiles as $b) |
| 228 | 228 | { |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | */ |
| 58 | 58 | public function __construct(TmdbInterface $tmdb, $tv_id, $season_number, $episode_number, array $options = array()) |
| 59 | 59 | { |
| 60 | - parent::__construct($tmdb, $episode_number, $options, 'tv/'.$tv_id.'/'.$season_number); |
|
| 60 | + parent::__construct($tmdb, $episode_number, $options, 'tv/' . $tv_id . '/' . $season_number); |
|
| 61 | 61 | |
| 62 | 62 | $this->season_number = $season_number; |
| 63 | 63 | $this->episode_number = $episode_number; |
@@ -218,7 +218,7 @@ discard block |
||
| 218 | 218 | */ |
| 219 | 219 | public function getPosters() |
| 220 | 220 | { |
| 221 | - $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/'.(int) $this->id.'/seasons/'.$this->season_number.'/episode/'.$this->episode_number.'/images', null, $this->params); |
|
| 221 | + $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/tv/' . (int) $this->id . '/seasons/' . $this->season_number . '/episode/' . $this->episode_number . '/images', null, $this->params); |
|
| 222 | 222 | |
| 223 | 223 | foreach ($data->posters as $b) |
| 224 | 224 | { |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function __construct(TmdbInterface $tmdb, $people_id, array $options = array()) |
| 38 | 38 | { |
| 39 | - parent::__construct($tmdb, '/tv_credits', $options, 'person/'.$people_id); |
|
| 39 | + parent::__construct($tmdb, '/tv_credits', $options, 'person/' . $people_id); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | */ |
| 37 | 37 | public function __construct(TmdbInterface $tmdb, $people_id, array $options = array()) |
| 38 | 38 | { |
| 39 | - parent::__construct($tmdb, '/movie_credits', $options, 'person/'.$people_id); |
|
| 39 | + parent::__construct($tmdb, '/movie_credits', $options, 'person/' . $people_id); |
|
| 40 | 40 | } |
| 41 | 41 | |
| 42 | 42 | /** |