Completed
Pull Request — master (#23)
by vincent
04:12 queued 02:01
created
src/Tmdb.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
      *
31 31
      * @var LoggerInterface
32 32
      */
33
-    public $logger           = null;
33
+    public $logger = null;
34 34
 
35 35
     /**
36 36
      * Constructor
Please login to merge, or discard this patch.
src/Factory.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@
 block discarded – undo
50 50
      */
51 51
     public function extractConfig(array $builderConfig)
52 52
     {
53
-        return isset($builderConfig['config']) ? $builderConfig['config']:[];
53
+        return isset($builderConfig['config']) ? $builderConfig['config'] : [];
54 54
     }
55 55
 
56 56
     public function checkDependency(BuilderInterface $builder)
57 57
     {
58
-        if (! class_exists($builder->getMainCLassName())) {
58
+        if (!class_exists($builder->getMainCLassName())) {
59 59
             $message = "missing {$builder->getPackageName()}, please install it using composer : composer require {$builder->getPackageName()}";
60 60
             throw new MissingDependencyException($message);
61 61
         }
Please login to merge, or discard this patch.
src/Factory/Builder/MonologBuilder.php 1 patch
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.
src/Results/TVSeason.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
     protected $episode_count = 0;
13 13
     protected $season_number = 0;
14 14
     protected $poster_path   = null;
15
-    protected $air_date  = null;
15
+    protected $air_date = null;
16 16
 
17 17
     /**
18 18
      * Constructor
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 
27 27
         // Populate data
28 28
         $this->id            = $this->data->id;
29
-        $this->air_date  = $this->data->air_date;
29
+        $this->air_date = $this->data->air_date;
30 30
         $this->episode_count = $this->data->episode_count;
31 31
         $this->poster_path   = $this->data->poster_path;
32 32
         $this->season_number = $this->data->season_number;
Please login to merge, or discard this patch.
src/Items/TVSeason.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -19,12 +19,12 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function __construct(Tmdb $tmdb, $tv_id, $season_number, array $options = array())
21 21
     {
22
-        parent::__construct($tmdb, $season_number, $options, 'tv/'.$tv_id);
22
+        parent::__construct($tmdb, $season_number, $options, 'tv/' . $tv_id);
23 23
     }
24 24
 
25 25
     public function getId()
26 26
     {
27
-        if (! empty($this->data->id)) {
27
+        if (!empty($this->data->id)) {
28 28
             return (int) $this->data->id;
29 29
         }
30 30
         return 0;
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 
33 33
     public function getAirDate()
34 34
     {
35
-        if (! empty($this->data->air_date)) {
35
+        if (!empty($this->data->air_date)) {
36 36
             return $this->data->air_date;
37 37
         }
38 38
         return '';
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
     public function getEpisodeCount()
42 42
     {
43
-        if (! empty($this->data->episodes)) {
43
+        if (!empty($this->data->episodes)) {
44 44
             return count($this->data->episodes);
45 45
         }
46 46
         return 0;
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 
49 49
     public function getSeasonNumber()
50 50
     {
51
-        if (! empty($this->data->season_number)) {
51
+        if (!empty($this->data->season_number)) {
52 52
             return (int) $this->data->season_number;
53 53
         }
54 54
         return 0;
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function getEpisodes()
58 58
     {
59
-        if (! empty($this->data->episodes)) {
59
+        if (!empty($this->data->episodes)) {
60 60
             foreach ($this->data->episodes as $episode) {
61 61
                 $episode = new \vfalies\tmdb\Results\TVEpisode($this->tmdb, $episode);
62 62
                 yield $episode;
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 
67 67
     public function getName()
68 68
     {
69
-        if (! empty($this->data->name)) {
69
+        if (!empty($this->data->name)) {
70 70
             return $this->data->name;
71 71
         }
72 72
         return '';
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function getOverview()
76 76
     {
77
-        if (! empty($this->data->overview)) {
77
+        if (!empty($this->data->overview)) {
78 78
             return $this->data->overview;
79 79
         }
80 80
         return '';
Please login to merge, or discard this patch.
src/Search.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
                 throw new IncorrectParamException;
48 48
             }
49 49
             $params   = $this->tmdb->checkOptions($options);
50
-            $response = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), 'search/'.$item, $query, $params);
50
+            $response = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), 'search/' . $item, $query, $params);
51 51
 
52 52
             $this->page          = (int) $response->page;
53 53
             $this->total_pages   = (int) $response->total_pages;
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
         try
90 90
         {
91 91
             $this->logger->debug('Starting search movie');
92
-            return $this->searchItem('movie', $query, $options, __NAMESPACE__."\\Results\\".'Movie');
92
+            return $this->searchItem('movie', $query, $options, __NAMESPACE__ . "\\Results\\" . 'Movie');
93 93
         }
94 94
         catch (TmdbException $ex)
95 95
         {
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
         try
110 110
         {
111 111
             $this->logger->debug('Starting search tv show');
112
-            return $this->searchItem('tv', $query, $options, __NAMESPACE__."\\Results\\".'TVShow');
112
+            return $this->searchItem('tv', $query, $options, __NAMESPACE__ . "\\Results\\" . 'TVShow');
113 113
         }
114 114
         catch (TmdbException $ex)
115 115
         {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
         try
130 130
         {
131 131
             $this->logger->debug('Starting search collection');
132
-            return $this->searchItem('collection', $query, $options, __NAMESPACE__."\\Results\\".'Collection');
132
+            return $this->searchItem('collection', $query, $options, __NAMESPACE__ . "\\Results\\" . 'Collection');
133 133
         }
134 134
         catch (TmdbException $ex)
135 135
         {
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         try
150 150
         {
151 151
             $this->logger->debug('Starting search people');
152
-            return $this->searchItem('people', $query, $options, __NAMESPACE__."\\Results\\".'People');
152
+            return $this->searchItem('people', $query, $options, __NAMESPACE__ . "\\Results\\" . 'People');
153 153
         }
154 154
         catch (TmdbException $ex)
155 155
         {
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
         try
170 170
         {
171 171
             $this->logger->debug('Starting search company');
172
-            return $this->searchItem('company', $query, $options, __NAMESPACE__."\\Results\\".'Company');
172
+            return $this->searchItem('company', $query, $options, __NAMESPACE__ . "\\Results\\" . 'Company');
173 173
         }
174 174
         catch (TmdbException $ex)
175 175
         {
Please login to merge, or discard this patch.
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -54,8 +54,7 @@  discard block
 block discarded – undo
54 54
             $this->total_results = (int) $response->total_results;
55 55
 
56 56
             return $this->searchItemGenerator($response->results, $result_class);
57
-        }
58
-        catch (TmdbException $ex)
57
+        } catch (TmdbException $ex)
59 58
         {
60 59
             throw $ex;
61 60
         }
@@ -90,8 +89,7 @@  discard block
 block discarded – undo
90 89
         {
91 90
             $this->logger->debug('Starting search movie');
92 91
             return $this->searchItem('movie', $query, $options, __NAMESPACE__."\\Results\\".'Movie');
93
-        }
94
-        catch (TmdbException $ex)
92
+        } catch (TmdbException $ex)
95 93
         {
96 94
             throw $ex;
97 95
         }
@@ -110,8 +108,7 @@  discard block
 block discarded – undo
110 108
         {
111 109
             $this->logger->debug('Starting search tv show');
112 110
             return $this->searchItem('tv', $query, $options, __NAMESPACE__."\\Results\\".'TVShow');
113
-        }
114
-        catch (TmdbException $ex)
111
+        } catch (TmdbException $ex)
115 112
         {
116 113
             throw $ex;
117 114
         }
@@ -130,8 +127,7 @@  discard block
 block discarded – undo
130 127
         {
131 128
             $this->logger->debug('Starting search collection');
132 129
             return $this->searchItem('collection', $query, $options, __NAMESPACE__."\\Results\\".'Collection');
133
-        }
134
-        catch (TmdbException $ex)
130
+        } catch (TmdbException $ex)
135 131
         {
136 132
             throw $ex;
137 133
         }
@@ -150,8 +146,7 @@  discard block
 block discarded – undo
150 146
         {
151 147
             $this->logger->debug('Starting search people');
152 148
             return $this->searchItem('people', $query, $options, __NAMESPACE__."\\Results\\".'People');
153
-        }
154
-        catch (TmdbException $ex)
149
+        } catch (TmdbException $ex)
155 150
         {
156 151
             throw $ex;
157 152
         }
@@ -170,8 +165,7 @@  discard block
 block discarded – undo
170 165
         {
171 166
             $this->logger->debug('Starting search company');
172 167
             return $this->searchItem('company', $query, $options, __NAMESPACE__."\\Results\\".'Company');
173
-        }
174
-        catch (TmdbException $ex)
168
+        } catch (TmdbException $ex)
175 169
         {
176 170
             throw $ex;
177 171
         }
Please login to merge, or discard this patch.