Passed
Branch release/1.5.0 (3fa0b2)
by vincent
02:31
created
src/Factory.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/Tmdb.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
     /**
90 90
      * Constructor
91 91
      * @param string $api_key TMDB API Key
92
-     * @param string $version Version of API (Not yet used)
92
+     * @param integer $version Version of API (Not yet used)
93 93
      * @param LoggerInterface $logger Logger used in the class
94 94
      */
95 95
     public function __construct($api_key, $version = 3, LoggerInterface $logger)
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/Abstracts/Item.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@  discard block
 block discarded – undo
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 TmdbInterface
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
75 75
             $this->logger = $tmdb->getLogger();
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
         {
Please login to merge, or discard this patch.
src/Abstracts/Results.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -36,22 +36,22 @@  discard block
 block discarded – undo
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 TmdbInterface
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
 block discarded – undo
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
             }
Please login to merge, or discard this patch.
src/Catalog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@
 block discarded – undo
31 31
      * Tmdb object
32 32
      * @var TmdbInterface
33 33
      */
34
-    private $tmdb   = null;
34
+    private $tmdb = null;
35 35
     /**
36 36
      * Logger
37 37
      * @var LoggerInterface
Please login to merge, or discard this patch.
src/Items/Collection.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      * Id
49 49
      * @var int
50 50
      */
51
-    protected $id   = null;
51
+    protected $id = null;
52 52
     /**
53 53
      * Tmdb object
54 54
      * @var TmdbInterface
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      */
110 110
     public function getBackdrops()
111 111
     {
112
-        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/collection/'.(int) $this->id.'/images', null, $this->params);
112
+        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/collection/' . (int) $this->id . '/images', null, $this->params);
113 113
 
114 114
         foreach ($data->backdrops as $b)
115 115
         {
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     public function getPosters()
126 126
     {
127
-        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/collection/'.(int) $this->id.'/images', null, $this->params);
127
+        $data = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), '/collection/' . (int) $this->id . '/images', null, $this->params);
128 128
 
129 129
         foreach ($data->posters as $b)
130 130
         {
Please login to merge, or discard this patch.
src/Item.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
      * Tmdb object
35 35
      * @var TmdbInterface
36 36
      */
37
-    private $tmdb   = null;
37
+    private $tmdb = null;
38 38
     /**
39 39
      * Logger object
40 40
      * @var LoggerInterface
Please login to merge, or discard this patch.
src/Media.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,12 +31,12 @@
 block discarded – undo
31 31
      * Tmdb object
32 32
      * @var TmdbInterface
33 33
      */
34
-    protected $tmdb   = null;
34
+    protected $tmdb = null;
35 35
     /**
36 36
      * Configuration
37 37
      * @var \stdClass
38 38
      */
39
-    protected $conf   = null;
39
+    protected $conf = null;
40 40
     /**
41 41
      * Logger
42 42
      * @var LoggerInterface
Please login to merge, or discard this patch.
src/Search.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,22 +32,22 @@  discard block
 block discarded – undo
32 32
      * Tmdb object
33 33
      * @var TmdbInterface
34 34
      */
35
-    private $tmdb          = null;
35
+    private $tmdb = null;
36 36
     /**
37 37
      * Logger
38 38
      * @var LoggerInterface
39 39
      */
40
-    private $logger        = null;
40
+    private $logger = null;
41 41
     /**
42 42
      * Page number of the search result
43 43
      * @var int
44 44
      */
45
-    private $page          = 1;
45
+    private $page = 1;
46 46
     /**
47 47
      * Total pages of the search result
48 48
      * @var int
49 49
      */
50
-    private $total_pages   = 1;
50
+    private $total_pages = 1;
51 51
     /**
52 52
      * Total results of the search result
53 53
      * @var int
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 throw new IncorrectParamException;
86 86
             }
87 87
             $params   = $this->tmdb->checkOptions($options);
88
-            $response = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), 'search/'.$item, $query, $params);
88
+            $response = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), 'search/' . $item, $query, $params);
89 89
 
90 90
             $this->page          = (int) $response->page;
91 91
             $this->total_pages   = (int) $response->total_pages;
Please login to merge, or discard this patch.