Passed
Branch account (ed4c74)
by vincent
02:20
created
src/VfacTmdb/Account/Favorite.php 3 patches
Indentation   -1 removed lines patch added patch discarded remove patch
@@ -82,7 +82,6 @@
 block discarded – undo
82 82
         return $this->markAsFavorite('movie', $movie_id, true);
83 83
     }
84 84
     /**
85
-
86 85
      * Unmark a movie as favorite
87 86
      * @param int $movie_id Movie id
88 87
      * @return Favorite
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
  *
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
             $params['media_id']   = $media_id;
63 63
             $params['favorite']   = $favorite;
64 64
 
65
-            $this->tmdb->postRequest('account/'.$this->account_id.'/favorite', $this->options, $params);
65
+            $this->tmdb->postRequest('account/' . $this->account_id . '/favorite', $this->options, $params);
66 66
 
67 67
             return $this;
68 68
         } catch (TmdbException $e) {
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     private function getAccountItems(string $item, string $result_class) : \Generator
120 120
     {
121
-        $response = $this->tmdb->getRequest('account/'.$this->account_id.'/favorite/'.$item, $this->options);
121
+        $response = $this->tmdb->getRequest('account/' . $this->account_id . '/favorite/' . $item, $this->options);
122 122
 
123 123
         $this->page          = (int) $response->page;
124 124
         $this->total_pages   = (int) $response->total_pages;
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,8 @@
 block discarded – undo
65 65
             $this->tmdb->postRequest('account/'.$this->account_id.'/favorite', $this->options, $params);
66 66
 
67 67
             return $this;
68
-        } catch (TmdbException $e) {
68
+        }
69
+        catch (TmdbException $e) {
69 70
             throw $e;
70 71
         }
71 72
     }
Please login to merge, or discard this patch.
src/VfacTmdb/Factory.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
      */
66 66
     public function getBuilder(string $builder, array $args = []) : LoggerBuilderInterface
67 67
     {
68
-        $class = "\\VfacTmdb\\Factory\\Builder\\{$builder}Builder";
68
+        $class = "\\VfacTmdb\\Factory\\Builder\\{$builder}builder";
69 69
 
70 70
         $reflection = new \ReflectionClass($class);
71 71
 
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/Auth.php 2 patches
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -121,11 +121,11 @@
 block discarded – undo
121 121
     public function __get(string $name)
122 122
     {
123 123
         switch ($name) {
124
-          case 'request_token':
124
+            case 'request_token':
125 125
           case 'session_id':
126 126
               return $this->$name;
127
-          default:
127
+            default:
128 128
               throw new NotFoundException();
129
-      }
129
+        }
130 130
     }
131 131
 }
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
  *
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
      * Session Id
54 54
      * @var string
55 55
      */
56
-    private $session_id  = null;
56
+    private $session_id = null;
57 57
 
58 58
     /**
59 59
      * Constructor
Please login to merge, or discard this patch.
src/VfacTmdb/Exceptions/HttpErrorException.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/Items/People.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
 /**
4 4
  * This file is part of the Tmdb package.
Please login to merge, or discard this patch.
src/VfacTmdb/Items/TVEpisode.php 2 patches
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
  *
@@ -58,7 +58,7 @@  discard block
 block discarded – undo
58 58
      */
59 59
     public function __construct(TmdbInterface $tmdb, int $tv_id, int $season_number, int $episode_number, array $options = array())
60 60
     {
61
-        parent::__construct($tmdb, $episode_number, $options, 'tv/' . $tv_id . '/season/' . $season_number.'/episode');
61
+        parent::__construct($tmdb, $episode_number, $options, 'tv/' . $tv_id . '/season/' . $season_number . '/episode');
62 62
 
63 63
         $this->season_number  = $season_number;
64 64
         $this->episode_number = $episode_number;
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
 
105 105
     /**
106 106
      * Guests stars
107
-     * @return \Generator|Results\Cast
107
+     * @return \Generator
108 108
      */
109 109
     public function getGuestStars() : \Generator
110 110
     {
Please login to merge, or discard this patch.
src/VfacTmdb/Account/Rated.php 2 patches
Spacing   +10 added lines, -10 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
  *
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function getMovies() : \Generator
37 37
     {
38
-        $response = $this->tmdb->getRequest('account/'.$this->account_id.'/rated/movies', $this->options);
38
+        $response = $this->tmdb->getRequest('account/' . $this->account_id . '/rated/movies', $this->options);
39 39
 
40 40
         $this->page          = (int) $response->page;
41 41
         $this->total_pages   = (int) $response->total_pages;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function getTVShows() : \Generator
52 52
     {
53
-        $response = $this->tmdb->getRequest('account/'.$this->account_id.'/rated/tv', $this->options);
53
+        $response = $this->tmdb->getRequest('account/' . $this->account_id . '/rated/tv', $this->options);
54 54
 
55 55
         $this->page          = (int) $response->page;
56 56
         $this->total_pages   = (int) $response->total_pages;
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function getTVEpisodes() : \Generator
67 67
     {
68
-        $response = $this->tmdb->getRequest('account/'.$this->account_id.'/rated/tv/episodes', $this->options);
68
+        $response = $this->tmdb->getRequest('account/' . $this->account_id . '/rated/tv/episodes', $this->options);
69 69
 
70 70
         $this->page          = (int) $response->page;
71 71
         $this->total_pages   = (int) $response->total_pages;
@@ -82,7 +82,7 @@  discard block
 block discarded – undo
82 82
      */
83 83
     public function addMovieRate(int $movie_id, float $rate) : Rated
84 84
     {
85
-        return $this->addRate('movie/'.$movie_id.'/rating', $rate);
85
+        return $this->addRate('movie/' . $movie_id . '/rating', $rate);
86 86
     }
87 87
 
88 88
     /**
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function removeMovieRate(int $movie_id) : Rated
94 94
     {
95
-        return $this->removeRate('movie/'.$movie_id.'/rating');
95
+        return $this->removeRate('movie/' . $movie_id . '/rating');
96 96
     }
97 97
 
98 98
     /**
@@ -103,7 +103,7 @@  discard block
 block discarded – undo
103 103
      */
104 104
     public function addTVShowRate(int $tv_id, float $rate) : Rated
105 105
     {
106
-        return $this->addRate('tv/'.$tv_id.'/rating', $rate);
106
+        return $this->addRate('tv/' . $tv_id . '/rating', $rate);
107 107
     }
108 108
 
109 109
     /**
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
      */
114 114
     public function removeTVShowRate(int $tv_id) : Rated
115 115
     {
116
-        return $this->removeRate('tv/'.$tv_id.'/rating');
116
+        return $this->removeRate('tv/' . $tv_id . '/rating');
117 117
     }
118 118
 
119 119
     /**
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
      */
127 127
     public function addTVShowEpisodeRate(int $tv_id, int $season_number, int $episode_number, float $rate) : Rated
128 128
     {
129
-        return $this->addRate('tv/'.$tv_id.'/season/'.$season_number.'/episode/'.$episode_number.'/rating', $rate);
129
+        return $this->addRate('tv/' . $tv_id . '/season/' . $season_number . '/episode/' . $episode_number . '/rating', $rate);
130 130
     }
131 131
 
132 132
     /**
@@ -138,7 +138,7 @@  discard block
 block discarded – undo
138 138
      */
139 139
     public function removeTVShowEpisodeRate(int $tv_id, int $season_number, int $episode_number) : Rated
140 140
     {
141
-        return $this->removeRate('tv/'.$tv_id.'/season/'.$season_number.'/episode/'.$episode_number.'/rating');
141
+        return $this->removeRate('tv/' . $tv_id . '/season/' . $season_number . '/episode/' . $episode_number . '/rating');
142 142
     }
143 143
 
144 144
     /**
Please login to merge, or discard this patch.
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.
src/VfacTmdb/Account/WatchList.php 2 patches
Spacing   +4 added lines, -4 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
  *
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
      */
36 36
     public function getMovies() : \Generator
37 37
     {
38
-        $response = $this->tmdb->getRequest('account/'.$this->account_id.'/watchlist/movies', $this->options);
38
+        $response = $this->tmdb->getRequest('account/' . $this->account_id . '/watchlist/movies', $this->options);
39 39
 
40 40
         $this->page          = (int) $response->page;
41 41
         $this->total_pages   = (int) $response->total_pages;
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
      */
51 51
     public function getTVShows() : \Generator
52 52
     {
53
-        $response = $this->tmdb->getRequest('account/'.$this->account_id.'/watchlist/tv', $this->options);
53
+        $response = $this->tmdb->getRequest('account/' . $this->account_id . '/watchlist/tv', $this->options);
54 54
 
55 55
         $this->page          = (int) $response->page;
56 56
         $this->total_pages   = (int) $response->total_pages;
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
             $params['media_id']   = $media_id;
75 75
             $params['watchlist']  = $watchlist;
76 76
 
77
-            $this->tmdb->postRequest('account/'.$this->account_id.'/watchlist', $this->options, $params);
77
+            $this->tmdb->postRequest('account/' . $this->account_id . '/watchlist', $this->options, $params);
78 78
 
79 79
             return $this;
80 80
         } catch (TmdbException $e) {
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,8 @@
 block discarded – undo
77 77
             $this->tmdb->postRequest('account/'.$this->account_id.'/watchlist', $this->options, $params);
78 78
 
79 79
             return $this;
80
-        } catch (TmdbException $e) {
80
+        }
81
+        catch (TmdbException $e) {
81 82
             throw $e;
82 83
         }
83 84
     }
Please login to merge, or discard this patch.
src/VfacTmdb/Exceptions/IncorrectParamException.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.