@@ -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 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -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 | } |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -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 | + } |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -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 |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -1,4 +1,4 @@ |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | /** |
4 | 4 | * This file is part of the Tmdb package. |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -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 | /** |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | /** |
3 | 3 | * This file is part of the Tmdb package. |
4 | 4 | * |
@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | */ |
41 | 41 | public function __construct(TmdbInterface $tmdb, int $tv_id, int $season_number, int $episode_number, array $options = array()) |
42 | 42 | { |
43 | - parent::__construct($tmdb, $episode_number, $options, 'tv/' . $tv_id . '/season/' . $season_number.'/episode'); |
|
43 | + parent::__construct($tmdb, $episode_number, $options, 'tv/' . $tv_id . '/season/' . $season_number . '/episode'); |
|
44 | 44 | |
45 | 45 | $this->season_number = $season_number; |
46 | 46 | $this->episode_number = $episode_number; |
@@ -1,4 +1,4 @@ discard block |
||
1 | -<?php declare(strict_types = 1); |
|
1 | +<?php declare(strict_types=1); |
|
2 | 2 | |
3 | 3 | /** |
4 | 4 | * This file is part of the Tmdb package. |
@@ -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 | } |
@@ -325,7 +325,7 @@ discard block |
||
325 | 325 | default: |
326 | 326 | throw new IncorrectParamException; |
327 | 327 | } |
328 | - $return['sort_by'] = 'created_at.'.$options['sort_by']; |
|
328 | + $return['sort_by'] = 'created_at.' . $options['sort_by']; |
|
329 | 329 | } |
330 | 330 | } |
331 | 331 |