Passed
Push — master ( 6001ea...6deb14 )
by
unknown
25:56 queued 21:35
created
src/Tmdb.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@
 block discarded – undo
150 150
 
151 151
     /**
152 152
      * Check year format
153
-     * @param mixed $year year to validate
153
+     * @param integer $year year to validate
154 154
      * @return int year validated
155 155
      * @throws \Exception
156 156
      */
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -9,11 +9,11 @@
 block discarded – undo
9 9
 {
10 10
 
11 11
     // Private variables
12
-    private $api_key         = null;                              // API Key
13
-    private $language        = 'fr-FR';                           // Default language for API response
14
-    public $base_api_url     = 'https://api.themoviedb.org/3/';   // Base URL of the API
15
-    private $include_adult   = false;                             // Include adult content in search result
16
-    private $page            = 1;                                 // API Page result
12
+    private $api_key         = null; // API Key
13
+    private $language        = 'fr-FR'; // Default language for API response
14
+    public $base_api_url     = 'https://api.themoviedb.org/3/'; // Base URL of the API
15
+    private $include_adult   = false; // Include adult content in search result
16
+    private $page            = 1; // API Page result
17 17
     // Protected variables
18 18
     protected $configuration = null; // API Configuration
19 19
     protected $genres        = null; // API Genres
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -104,8 +104,7 @@
 block discarded – undo
104 104
                 $this->configuration = $this->sendRequest(new CurlRequest(), 'configuration');
105 105
             }
106 106
             return $this->configuration;
107
-        }
108
-        catch (\Exception $ex)
107
+        } catch (\Exception $ex)
109 108
         {
110 109
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
111 110
         }
Please login to merge, or discard this patch.
src/TVShow.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -21,8 +21,7 @@
 block discarded – undo
21 21
             // Get tvshow details
22 22
             $params     = $this->tmdb->checkOptions($options);
23 23
             $this->data = $this->tmdb->sendRequest(new CurlRequest(), 'tv/' . (int) $tv_id, null, $params);
24
-        }
25
-        catch (\Exception $ex)
24
+        } catch (\Exception $ex)
26 25
         {
27 26
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
28 27
         }
Please login to merge, or discard this patch.
src/Collection.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,8 +26,7 @@
 block discarded – undo
26 26
 
27 27
             $params     = $this->tmdb->checkOptions($options);
28 28
             $this->data = $this->tmdb->sendRequest(new CurlRequest(), 'collection/' . (int) $collection_id, null, $params);
29
-        }
30
-        catch (\Exception $ex)
29
+        } catch (\Exception $ex)
31 30
         {
32 31
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
33 32
         }
Please login to merge, or discard this patch.
src/Genres.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@  discard block
 block discarded – undo
28 28
         try
29 29
         {            
30 30
             return $this->getList('genre/movie/list', $options);
31
-        }
32
-        catch (\Exception $ex)
31
+        } catch (\Exception $ex)
33 32
         {
34 33
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
35 34
         }
@@ -46,8 +45,7 @@  discard block
 block discarded – undo
46 45
         try
47 46
         {
48 47
             return $this->getList('genre/tv/list', $options);
49
-        }
50
-        catch (\Exception $ex)
48
+        } catch (\Exception $ex)
51 49
         {
52 50
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
53 51
         }
@@ -74,8 +72,7 @@  discard block
 block discarded – undo
74 72
             }
75 73
 
76 74
             return $this->genreItemGenerator($genres);
77
-        }
78
-        catch (\Exception $ex)
75
+        } catch (\Exception $ex)
79 76
         {
80 77
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
81 78
         }
Please login to merge, or discard this patch.
src/Search.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
                 throw new \Exception('query parameter can not be empty');
40 40
             }
41 41
             $params   = $this->tmdb->checkOptions($options);
42
-            $response = $this->tmdb->sendRequest(new CurlRequest(), 'search/'.$item, $query, $params);
42
+            $response = $this->tmdb->sendRequest(new CurlRequest(), 'search/' . $item, $query, $params);
43 43
 
44 44
             $this->page          = (int) $response->page;
45 45
             $this->total_pages   = (int) $response->total_pages;
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
     {
80 80
         try
81 81
         {
82
-            return $this->searchItem('movie', $query, $options, __NAMESPACE__."\\Results\\".'Movie');
82
+            return $this->searchItem('movie', $query, $options, __NAMESPACE__ . "\\Results\\" . 'Movie');
83 83
         }
84 84
         catch (\Exception $ex)
85 85
         {
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
     {
99 99
         try
100 100
         {
101
-            return $this->searchItem('tv', $query, $options, __NAMESPACE__."\\Results\\".'TVShow');
101
+            return $this->searchItem('tv', $query, $options, __NAMESPACE__ . "\\Results\\" . 'TVShow');
102 102
         }
103 103
         catch (\Exception $ex)
104 104
         {
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
     {
118 118
         try
119 119
         {
120
-            return $this->searchItem('collection', $query, $options, __NAMESPACE__."\\Results\\".'Collection');
120
+            return $this->searchItem('collection', $query, $options, __NAMESPACE__ . "\\Results\\" . 'Collection');
121 121
         }
122 122
         catch (\Exception $ex)
123 123
         {
Please login to merge, or discard this patch.
Braces   +4 added lines, -8 removed lines patch added patch discarded remove patch
@@ -46,8 +46,7 @@  discard block
 block discarded – undo
46 46
             $this->total_results = (int) $response->total_results;
47 47
 
48 48
             return $this->searchItemGenerator($response->results, $result_class);
49
-        }
50
-        catch (\Exception $ex)
49
+        } catch (\Exception $ex)
51 50
         {
52 51
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
53 52
         }
@@ -80,8 +79,7 @@  discard block
 block discarded – undo
80 79
         try
81 80
         {
82 81
             return $this->searchItem('movie', $query, $options, __NAMESPACE__."\\Results\\".'Movie');
83
-        }
84
-        catch (\Exception $ex)
82
+        } catch (\Exception $ex)
85 83
         {
86 84
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
87 85
         }
@@ -99,8 +97,7 @@  discard block
 block discarded – undo
99 97
         try
100 98
         {
101 99
             return $this->searchItem('tv', $query, $options, __NAMESPACE__."\\Results\\".'TVShow');
102
-        }
103
-        catch (\Exception $ex)
100
+        } catch (\Exception $ex)
104 101
         {
105 102
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
106 103
         }
@@ -118,8 +115,7 @@  discard block
 block discarded – undo
118 115
         try
119 116
         {
120 117
             return $this->searchItem('collection', $query, $options, __NAMESPACE__."\\Results\\".'Collection');
121
-        }
122
-        catch (\Exception $ex)
118
+        } catch (\Exception $ex)
123 119
         {
124 120
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
125 121
         }
Please login to merge, or discard this patch.
src/CurlRequest.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
         $result = curl_exec($this->handle);
36 36
         if ($result === false)
37 37
         {
38
-            throw new \Exception('cUrl failed : '.var_export($this->getInfo(), true), 1004);
38
+            throw new \Exception('cUrl failed : ' . var_export($this->getInfo(), true), 1004);
39 39
         }
40 40
         return $result;
41 41
     }
Please login to merge, or discard this patch.
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
         if (empty($name))
52 52
         {
53 53
             $info = curl_getinfo($this->handle);
54
-        }
55
-        else
54
+        } else
56 55
         {
57 56
             $info = curl_getinfo($this->handle, $name);
58 57
         }
Please login to merge, or discard this patch.
src/Movie.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,8 +28,7 @@
 block discarded – undo
28 28
             // Get movie details
29 29
             $params     = $this->tmdb->checkOptions($options);
30 30
             $this->data = $this->tmdb->sendRequest(new CurlRequest(), 'movie/' . $movie_id, null, $params);
31
-        }
32
-        catch (\Exception $ex)
31
+        } catch (\Exception $ex)
33 32
         {
34 33
             throw new \Exception($ex->getMessage(), $ex->getCode(), $ex);
35 34
         }
Please login to merge, or discard this patch.
src/Results/Collection.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@
 block discarded – undo
5 5
 class Collection extends Results
6 6
 {
7 7
 
8
-    protected $name          = null;
8
+    protected $name = null;
9 9
 
10 10
     /**
11 11
      * Constructor
Please login to merge, or discard this patch.