Completed
Branch account (67fd83)
by vincent
05:37
created
src/VfacTmdb/lib/Guzzle/Client.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,8 @@
 block discarded – undo
61 61
             ]);
62 62
 
63 63
             return $this->guzzleClient->request($method, $url, $params);
64
-        } catch (RequestException $e) {
64
+        }
65
+        catch (RequestException $e) {
65 66
             if (is_null($e->getResponse())) {
66 67
                 throw new HttpErrorException;
67 68
             }
Please login to merge, or discard this patch.
src/VfacTmdb/Account/Rated.php 2 patches
Braces   +4 added lines, -2 removed lines patch added patch discarded remove patch
@@ -156,7 +156,8 @@  discard block
 block discarded – undo
156 156
             $this->tmdb->postRequest($action, $this->options, $params);
157 157
 
158 158
             return $this;
159
-        } catch (TmdbException $e) {
159
+        }
160
+        catch (TmdbException $e) {
160 161
             throw $e;
161 162
         }
162 163
     }
@@ -172,7 +173,8 @@  discard block
 block discarded – undo
172 173
             $this->tmdb->deleteRequest($action, $this->options);
173 174
 
174 175
             return $this;
175
-        } catch (TmdbException $e) {
176
+        }
177
+        catch (TmdbException $e) {
176 178
             throw $e;
177 179
         }
178 180
     }
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
      */
65 65
     public function addMovieRate(int $movie_id, float $rate) : Rated
66 66
     {
67
-        return $this->addRate('movie/'.$movie_id.'/rating', $rate);
67
+        return $this->addRate('movie/' . $movie_id . '/rating', $rate);
68 68
     }
69 69
 
70 70
     /**
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function removeMovieRate(int $movie_id) : Rated
76 76
     {
77
-        return $this->removeRate('movie/'.$movie_id.'/rating');
77
+        return $this->removeRate('movie/' . $movie_id . '/rating');
78 78
     }
79 79
 
80 80
     /**
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
      */
86 86
     public function addTVShowRate(int $tv_id, float $rate) : Rated
87 87
     {
88
-        return $this->addRate('tv/'.$tv_id.'/rating', $rate);
88
+        return $this->addRate('tv/' . $tv_id . '/rating', $rate);
89 89
     }
90 90
 
91 91
     /**
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
      */
96 96
     public function removeTVShowRate(int $tv_id) : Rated
97 97
     {
98
-        return $this->removeRate('tv/'.$tv_id.'/rating');
98
+        return $this->removeRate('tv/' . $tv_id . '/rating');
99 99
     }
100 100
 
101 101
     /**
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
      */
109 109
     public function addTVShowEpisodeRate(int $tv_id, int $season_number, int $episode_number, float $rate) : Rated
110 110
     {
111
-        return $this->addRate('tv/'.$tv_id.'/season/'.$season_number.'/episode/'.$episode_number.'/rating', $rate);
111
+        return $this->addRate('tv/' . $tv_id . '/season/' . $season_number . '/episode/' . $episode_number . '/rating', $rate);
112 112
     }
113 113
 
114 114
     /**
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      */
121 121
     public function removeTVShowEpisodeRate(int $tv_id, int $season_number, int $episode_number) : Rated
122 122
     {
123
-        return $this->removeRate('tv/'.$tv_id.'/season/'.$season_number.'/episode/'.$episode_number.'/rating');
123
+        return $this->removeRate('tv/' . $tv_id . '/season/' . $season_number . '/episode/' . $episode_number . '/rating');
124 124
     }
125 125
 
126 126
     /**
Please login to merge, or discard this patch.
src/VfacTmdb/Search.php 2 patches
Braces   +12 added lines, -6 removed lines patch added patch discarded remove patch
@@ -79,7 +79,8 @@  discard block
 block discarded – undo
79 79
             $this->total_results = (int) $response->total_results;
80 80
 
81 81
             return $this->searchItemGenerator($response->results, $result_class);
82
-        } catch (TmdbException $ex) {
82
+        }
83
+        catch (TmdbException $ex) {
83 84
             throw $ex;
84 85
         }
85 86
     }
@@ -96,7 +97,8 @@  discard block
 block discarded – undo
96 97
         try {
97 98
             $this->logger->debug('Starting search movie', array('query' => $query, 'options' => $options));
98 99
             return $this->searchItem('movie', $query, $options, Results\Movie::class);
99
-        } catch (TmdbException $ex) {
100
+        }
101
+        catch (TmdbException $ex) {
100 102
             throw $ex;
101 103
         }
102 104
     }
@@ -113,7 +115,8 @@  discard block
 block discarded – undo
113 115
         try {
114 116
             $this->logger->debug('Starting search tv show', array('query' => $query, 'options' => $options));
115 117
             return $this->searchItem('tv', $query, $options, Results\TVShow::class);
116
-        } catch (TmdbException $ex) {
118
+        }
119
+        catch (TmdbException $ex) {
117 120
             throw $ex;
118 121
         }
119 122
     }
@@ -130,7 +133,8 @@  discard block
 block discarded – undo
130 133
         try {
131 134
             $this->logger->debug('Starting search collection', array('query' => $query, 'options' => $options));
132 135
             return $this->searchItem('collection', $query, $options, Results\Collection::class);
133
-        } catch (TmdbException $ex) {
136
+        }
137
+        catch (TmdbException $ex) {
134 138
             throw $ex;
135 139
         }
136 140
     }
@@ -147,7 +151,8 @@  discard block
 block discarded – undo
147 151
         try {
148 152
             $this->logger->debug('Starting search people', array('query' => $query, 'options' => $options));
149 153
             return $this->searchItem('person', $query, $options, Results\People::class);
150
-        } catch (TmdbException $ex) {
154
+        }
155
+        catch (TmdbException $ex) {
151 156
             throw $ex;
152 157
         }
153 158
     }
@@ -164,7 +169,8 @@  discard block
 block discarded – undo
164 169
         try {
165 170
             $this->logger->debug('Starting search company', array('query' => $query, 'options' => $options));
166 171
             return $this->searchItem('company', $query, $options, Results\Company::class);
167
-        } catch (TmdbException $ex) {
172
+        }
173
+        catch (TmdbException $ex) {
168 174
             throw $ex;
169 175
         }
170 176
     }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
      */
94 94
     private function checkSearchItemOption(array $options) : array
95 95
     {
96
-        $params           = [];
96
+        $params = [];
97 97
         $this->tmdb->checkOptionQuery($options, $params);
98 98
         $this->tmdb->checkOptionPage($options, $params);
99 99
         $this->tmdb->checkOptionLanguage($options, $params);
Please login to merge, or discard this patch.
src/VfacTmdb/Items/PeopleMovieCredit.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,8 @@
 block discarded – undo
35 35
             $this->cast_class = PeopleMovieCast::class;
36 36
 
37 37
             parent::__construct($tmdb, 'movie', $people_id, $options);
38
-        } catch (TmdbException $ex) {
38
+        }
39
+        catch (TmdbException $ex) {
39 40
             throw $ex;
40 41
         }
41 42
     }
Please login to merge, or discard this patch.
src/VfacTmdb/Items/PeopleTVShowCredit.php 3 patches
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -26,17 +26,17 @@
 block discarded – undo
26 26
  * @author Vincent Faliès <[email protected]>
27 27
  * @copyright Copyright (c) 2017
28 28
  */
29
- class PeopleTVShowCredit extends PeopleItemCredit
30
- {
31
-     public function __construct(TmdbInterface $tmdb, int $people_id, array $options = array())
32
-     {
33
-         try {
34
-             $this->crew_class = PeopleTVShowCrew::class;
35
-             $this->cast_class = PeopleTVShowCast::class;
29
+    class PeopleTVShowCredit extends PeopleItemCredit
30
+    {
31
+        public function __construct(TmdbInterface $tmdb, int $people_id, array $options = array())
32
+        {
33
+            try {
34
+                $this->crew_class = PeopleTVShowCrew::class;
35
+                $this->cast_class = PeopleTVShowCast::class;
36 36
 
37
-             parent::__construct($tmdb, 'tv', $people_id, $options);
38
-         } catch (TmdbException $ex) {
39
-             throw $ex;
40
-         }
41
-     }
42
- }
37
+                parent::__construct($tmdb, 'tv', $people_id, $options);
38
+            } catch (TmdbException $ex) {
39
+                throw $ex;
40
+            }
41
+        }
42
+    }
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,8 @@
 block discarded – undo
35 35
              $this->cast_class = PeopleTVShowCast::class;
36 36
 
37 37
              parent::__construct($tmdb, 'tv', $people_id, $options);
38
-         } catch (TmdbException $ex) {
38
+         }
39
+         catch (TmdbException $ex) {
39 40
              throw $ex;
40 41
          }
41 42
      }
Please login to merge, or discard this patch.
src/VfacTmdb/Account/WatchList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
src/VfacTmdb/Account/Favorite.php 2 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -56,7 +56,6 @@
 block discarded – undo
56 56
         return $this->setListItem('favorite', 'movie', $movie_id, true);
57 57
     }
58 58
     /**
59
-
60 59
      * Unmark a movie as favorite
61 60
      * @param int $movie_id Movie id
62 61
      * @return Favorite
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
Please login to merge, or discard this patch.
src/VfacTmdb/Abstracts/Account.php 2 patches
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -95,7 +95,8 @@
 block discarded – undo
95 95
             $this->tmdb->postRequest('account/'.$this->account_id.'/'.$list_type, $this->options, $params);
96 96
 
97 97
             return $this;
98
-        } catch (TmdbException $e) {
98
+        }
99
+        catch (TmdbException $e) {
99 100
             throw $e;
100 101
         }
101 102
     }
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
             $params['media_id']   = $media_id;
110 110
             $params[$list_type]   = $add;
111 111
 
112
-            $this->tmdb->postRequest('account/'.$this->account_id.'/'.$list_type, $this->options, $params);
112
+            $this->tmdb->postRequest('account/' . $this->account_id . '/' . $list_type, $this->options, $params);
113 113
 
114 114
             return $this;
115 115
         } catch (TmdbException $e) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         $this->tmdb->checkOptionSortBy($this->options, $options);
133 133
         $this->tmdb->checkOptionPage($this->options, $options);
134 134
 
135
-        $response = $this->tmdb->getRequest('account/'.$this->account_id.'/'.$list_type.'/'.$item, $options);
135
+        $response = $this->tmdb->getRequest('account/' . $this->account_id . '/' . $list_type . '/' . $item, $options);
136 136
 
137 137
         $this->page          = (int) $response->page;
138 138
         $this->total_pages   = (int) $response->total_pages;
Please login to merge, or discard this patch.
src/VfacTmdb/Abstracts/Items/TVItem.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 /**
3 3
  * This file is part of the Tmdb package.
4 4
  *
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         $options = [];
78 78
         $this->tmdb->checkOptionLanguage($this->params, $options);
79 79
 
80
-        $data   = $this->tmdb->getRequest($params->url, $options);
80
+        $data = $this->tmdb->getRequest($params->url, $options);
81 81
 
82 82
         foreach ($data->$key as $b) {
83 83
             $image = new Results\Image($this->tmdb, $this->id, $b);
Please login to merge, or discard this patch.