Passed
Branch release/1.5.0 (5f009d)
by vincent
05:05
created
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/Abstracts/Item.php 3 patches
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,7 @@
 block discarded – undo
36 36
             $this->conf   = $this->tmdb->getConfiguration();
37 37
             $this->params = $this->tmdb->checkOptions($options);
38 38
             $this->data   = $this->tmdb->sendRequest(new HttpClient(new \GuzzleHttp\Client()), $item_name.'/'.(int) $item_id, null, $this->params);
39
-        }
40
-        catch (TmdbException $ex)
39
+        } catch (TmdbException $ex)
41 40
         {
42 41
             throw $ex;
43 42
         }
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
  * For the full copyright and license information, please view the LICENSE
8 8
  * file that was distributed with this source code.
9 9
  *
10
-
11 10
  * @author Vincent Faliès <[email protected]>
12 11
  * @copyright Copyright (c) 2017
13 12
  */
Please login to merge, or discard this 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 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
 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->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
         {
Please login to merge, or discard this patch.
src/Catalog.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 
41 41
     /**
42 42
      * Constructor
43
-     * @param vfalies\tmdb\Interfaces\TmdbInterface $tmdb
43
+     * @param TmdbInterface $tmdb
44 44
      */
45 45
     public function __construct(TmdbInterface $tmdb)
46 46
     {
Please login to merge, or discard this patch.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
  * For the full copyright and license information, please view the LICENSE
8 8
  * file that was distributed with this source code.
9 9
  *
10
-
11 10
  * @author Vincent Faliès <[email protected]>
12 11
  * @copyright Copyright (c) 2017
13 12
  */
Please login to merge, or discard this 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 Tmdb
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/Catalogs/Jobs.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
     /**
45 45
      * Get job list
46 46
      * @param array $options
47
-     * @return \Generator|\stdClass
47
+     * @return \Generator
48 48
      * @throws \vfalies\tmdb\Catalogs\TmdbException
49 49
      */
50 50
     public function getList(array $options = array())
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -66,8 +66,7 @@
 block discarded – undo
66 66
                     yield $result;
67 67
                 }
68 68
             }
69
-        }
70
-        catch (TmdbException $ex)
69
+        } catch (TmdbException $ex)
71 70
         {
72 71
             throw $ex;
73 72
         }
Please login to merge, or discard this patch.
src/Factory.php 3 patches
Doc Comments   +2 added lines, -2 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
     {
@@ -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.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
  * For the full copyright and license information, please view the LICENSE
8 8
  * file that was distributed with this source code.
9 9
  *
10
-
11 10
  * @author Vincent Faliès <[email protected]>
12 11
  * @copyright Copyright (c) 2017
13 12
  */
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
      */
92 92
     public function extractConfig(array $builderConfig)
93 93
     {
94
-        return isset($builderConfig['config']) ? $builderConfig['config']:[];
94
+        return isset($builderConfig['config']) ? $builderConfig['config'] : [];
95 95
     }
96 96
 
97 97
     /**
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
      */
103 103
     public function checkDependency(BuilderInterface $builder)
104 104
     {
105
-        if (! class_exists($builder->getMainClassName())) {
105
+        if (!class_exists($builder->getMainClassName())) {
106 106
             $message = "missing {$builder->getPackageName()}, please install it using composer : composer require {$builder->getPackageName()}";
107 107
             throw new MissingDependencyException($message);
108 108
         }
Please login to merge, or discard this patch.
src/Items/Company.php 3 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.
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
  * For the full copyright and license information, please view the LICENSE
8 8
  * file that was distributed with this source code.
9 9
  *
10
-
11 10
  * @author Vincent Faliès <[email protected]>
12 11
  * @copyright Copyright (c) 2017
13 12
  */
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.
src/Tmdb.php 3 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
-    public $logger     = null;
81
+    public $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.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -166,8 +166,7 @@
 block discarded – undo
166 166
                 $this->configuration = $this->sendRequest(new HttpClient(new \GuzzleHttp\Client()), 'configuration');
167 167
             }
168 168
             return $this->configuration;
169
-        }
170
-        catch (TmdbException $ex)
169
+        } catch (TmdbException $ex)
171 170
         {
172 171
             throw $ex;
173 172
         }
Please login to merge, or discard this patch.
src/Abstracts/Results.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
  * For the full copyright and license information, please view the LICENSE
8 8
  * file that was distributed with this source code.
9 9
  *
10
-
11 10
  * @author Vincent Faliès <[email protected]>
12 11
  * @copyright Copyright (c) 2017
13 12
  */
Please login to merge, or discard this 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 \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
 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/Exceptions/ServerErrorException.php 1 patch
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,6 @@
 block discarded – undo
7 7
  * For the full copyright and license information, please view the LICENSE
8 8
  * file that was distributed with this source code.
9 9
  *
10
-
11 10
  * @author Vincent Faliès <[email protected]>
12 11
  * @copyright Copyright (c) 2017
13 12
  */
Please login to merge, or discard this patch.