Passed
Branch release/1.5.0 (b7c2e9)
by vincent
02:28
created
src/Factory/Builder/MonologBuilder.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,9 +25,9 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function __construct(array $config = [])
27 27
     {
28
-        $this->loggerName = isset($config['name']) ? $config['name']:$this->loggerName;
28
+        $this->loggerName = isset($config['name']) ? $config['name'] : $this->loggerName;
29 29
 
30
-        $this->handlersConfig = isset($config['handlers']) ? $config['handlers']:$this->handlersConfig;
30
+        $this->handlersConfig = isset($config['handlers']) ? $config['handlers'] : $this->handlersConfig;
31 31
     }
32 32
 
33 33
     /**
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
     {
56 56
         $reflection = new \ReflectionClass($class);
57 57
 
58
-        if (! $reflection->implementsInterface('Monolog\Handler\HandlerInterface')) {
58
+        if (!$reflection->implementsInterface('Monolog\Handler\HandlerInterface')) {
59 59
             throw new \InvalidArgumentException();
60 60
         }
61 61
 
Please login to merge, or discard this patch.
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,8 @@  discard block
 block discarded – undo
62 62
     {
63 63
         $logger = new Logger($this->loggerName);
64 64
 
65
-        foreach ($this->handlersConfig as $config) {
65
+        foreach ($this->handlersConfig as $config)
66
+        {
66 67
             $handler = $this->newHandler($config['class'], $config['params']);
67 68
             $logger->pushHandler($handler);
68 69
         }
@@ -80,7 +81,8 @@  discard block
 block discarded – undo
80 81
     {
81 82
         $reflection = new \ReflectionClass($class);
82 83
 
83
-        if (! $reflection->implementsInterface('Monolog\Handler\HandlerInterface')) {
84
+        if (! $reflection->implementsInterface('Monolog\Handler\HandlerInterface'))
85
+        {
84 86
             throw new \InvalidArgumentException();
85 87
         }
86 88
 
Please login to merge, or discard this patch.
src/Items/Company.php 4 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@
 block discarded – undo
116 116
 
117 117
     /**
118 118
      * Company movies list
119
-     * @return \Generator|Results\Movie
119
+     * @return \Generator
120 120
      */
121 121
     public function getMovies()
122 122
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@
 block discarded – undo
120 120
      */
121 121
     public function getMovies()
122 122
     {
123
-        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/company/'.(int) $this->id.'/movies', null, $this->params);
123
+        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/company/' . (int) $this->id . '/movies', null, $this->params);
124 124
 
125 125
         foreach ($data->results as $m)
126 126
         {
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
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
  */
Please login to merge, or discard this patch.
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -48,7 +48,8 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public function getDescription()
50 50
     {
51
-        if (isset($this->data->description)) {
51
+        if (isset($this->data->description))
52
+        {
52 53
             return $this->data->description;
53 54
         }
54 55
         return '';
@@ -60,7 +61,8 @@  discard block
 block discarded – undo
60 61
      */
61 62
     public function getHeadQuarters()
62 63
     {
63
-        if (isset($this->data->headquarters)) {
64
+        if (isset($this->data->headquarters))
65
+        {
64 66
             return $this->data->headquarters;
65 67
         }
66 68
         return '';
@@ -72,7 +74,8 @@  discard block
 block discarded – undo
72 74
      */
73 75
     public function getHomePage()
74 76
     {
75
-        if (isset($this->data->homepage)) {
77
+        if (isset($this->data->homepage))
78
+        {
76 79
             return $this->data->homepage;
77 80
         }
78 81
         return '';
@@ -84,7 +87,8 @@  discard block
 block discarded – undo
84 87
      */
85 88
     public function getId()
86 89
     {
87
-        if (isset($this->data->id)) {
90
+        if (isset($this->data->id))
91
+        {
88 92
             return $this->data->id;
89 93
         }
90 94
         return 0;
@@ -96,7 +100,8 @@  discard block
 block discarded – undo
96 100
      */
97 101
     public function getLogoPath()
98 102
     {
99
-        if (isset($this->data->logo_path)) {
103
+        if (isset($this->data->logo_path))
104
+        {
100 105
             return $this->data->logo_path;
101 106
         }
102 107
         return '';
@@ -108,7 +113,8 @@  discard block
 block discarded – undo
108 113
      */
109 114
     public function getName()
110 115
     {
111
-        if (isset($this->data->name)) {
116
+        if (isset($this->data->name))
117
+        {
112 118
             return $this->data->name;
113 119
         }
114 120
         return '';
Please login to merge, or discard this patch.
src/Tmdb.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
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
  */
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      * Logger
79 79
      * @var LoggerInterface
80 80
      */
81
-    protected $logger     = null;
81
+    protected $logger = null;
82 82
 
83 83
     /**
84 84
      * API Version
@@ -132,12 +132,12 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/Items/MovieCredit.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
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
  */
Please login to merge, or discard this patch.
src/Items/People.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@
 block discarded – undo
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
         {
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
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
  */
Please login to merge, or discard this patch.
src/Items/TVEpisode.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
         {
Please login to merge, or discard this patch.
src/Items/PeopleTVShowCredit.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
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
  */
Please login to merge, or discard this patch.
src/Items/PeopleMovieCredit.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@
 block discarded – undo
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
     /**
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
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
  */
Please login to merge, or discard this patch.
src/Items/Movie.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
      */
166 166
     public function getCollectionId()
167 167
     {
168
-        if ( ! empty($this->data->belongs_to_collection))
168
+        if (!empty($this->data->belongs_to_collection))
169 169
         {
170 170
             return (int) $this->data->belongs_to_collection->id;
171 171
         }
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
      */
199 199
     public function getProductionCompanies()
200 200
     {
201
-        if ( ! empty($this->data->production_companies))
201
+        if (!empty($this->data->production_companies))
202 202
         {
203 203
             foreach ($this->data->production_companies as $p)
204 204
             {
@@ -217,7 +217,7 @@  discard block
 block discarded – undo
217 217
      */
218 218
     public function getProductionCountries()
219 219
     {
220
-        if ( ! empty($this->data->production_countries))
220
+        if (!empty($this->data->production_countries))
221 221
         {
222 222
             foreach ($this->data->production_countries as $c)
223 223
             {
@@ -236,7 +236,7 @@  discard block
 block discarded – undo
236 236
      */
237 237
     public function getBackdrops()
238 238
     {
239
-        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/movie/'.(int) $this->id.'/images', null, $this->params);
239
+        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/movie/' . (int) $this->id . '/images', null, $this->params);
240 240
 
241 241
         foreach ($data->backdrops as $b)
242 242
         {
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
      */
252 252
     public function getPosters()
253 253
     {
254
-        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/movie/'.(int) $this->id.'/images', null, $this->params);
254
+        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/movie/' . (int) $this->id . '/images', null, $this->params);
255 255
 
256 256
         foreach ($data->posters as $b)
257 257
         {
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
      */
267 267
     public function getSimilar()
268 268
     {
269
-        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/movie/'.(int) $this->id.'/similar', null, $this->params);
269
+        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/movie/' . (int) $this->id . '/similar', null, $this->params);
270 270
 
271 271
         foreach ($data->results as $s)
272 272
         {
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -8,7 +8,6 @@
 block discarded – undo
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
  */
Please login to merge, or discard this patch.