Completed
Push — master ( 36ca24...91d14d )
by Matthew
02:30
created
classes/ComponentBase.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@
 block discarded – undo
12 12
         parent::__construct($cmsObject, $properties);
13 13
 
14 14
         // Remove extra component from end
15
-        if(ends_with($this->dirName, 'component')) {
15
+        if (ends_with($this->dirName, 'component')) {
16 16
             $this->dirName = substr($this->dirName, 0, -9);
17 17
         }
18 18
     }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -5,7 +5,8 @@
 block discarded – undo
5 5
 use Cms\Classes\CodeBase;
6 6
 use Cms\Classes\ComponentBase as OctoberComponentBase;
7 7
 
8
-abstract class ComponentBase extends OctoberComponentBase {
8
+abstract class ComponentBase extends OctoberComponentBase
9
+{
9 10
 
10 11
     public function __construct(CodeBase $cmsObject = null, $properties = [])
11 12
     {
Please login to merge, or discard this patch.
components/LatestEpisodeComponent.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -74,8 +74,8 @@
 block discarded – undo
74 74
         $showSlugFilter = $this->property('showSlugFilter');
75 75
         if (!empty($showSlugFilter)) {
76 76
             $this->show = Show::query()
77
-                  ->where('slug', $showSlugFilter)
78
-                  ->firstOrFail();
77
+                    ->where('slug', $showSlugFilter)
78
+                    ->firstOrFail();
79 79
 
80 80
             $this->episode = $this->show->episodes()
81 81
                     ->getQuery()
Please login to merge, or discard this patch.
components/FeedComponent.php 1 patch
Indentation   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -174,25 +174,25 @@
 block discarded – undo
174 174
     public function setState()
175 175
     {
176 176
         $this->show = $show = Show::query()
177
-                                  ->where('slug', $this->property('showSlug'))
178
-                                  ->firstOrFail();
177
+                                    ->where('slug', $this->property('showSlug'))
178
+                                    ->firstOrFail();
179 179
         $this->releaseType = $releaseType = ReleaseType::query()
180
-                                                       ->where('slug', $this->property('releaseTypeSlug'))
181
-                                                       ->firstOrFail();
180
+                                                        ->where('slug', $this->property('releaseTypeSlug'))
181
+                                                        ->firstOrFail();
182 182
         $this->episodes = $this->show->episodes()
183
-                                     ->with([
184
-                                         'releases' => function (Relation $query) use ($releaseType) {
185
-                                             /** @var Relation|Builder $query */
186
-                                             $query->where('release_type_id', $releaseType->id);
187
-                                         }
188
-                                     ])
189
-                                     ->where('published', true)
190
-                                     ->whereHas('releases', function (Builder $query) use ($releaseType) {
191
-                                         $query->where('release_type_id', $releaseType->id);
192
-                                     })
193
-                                     ->orderBy('release', 'desc')
194
-                                     ->take(intval($this->property('itemLimit')))
195
-                                     ->get();
183
+                                        ->with([
184
+                                            'releases' => function (Relation $query) use ($releaseType) {
185
+                                                /** @var Relation|Builder $query */
186
+                                                $query->where('release_type_id', $releaseType->id);
187
+                                            }
188
+                                        ])
189
+                                        ->where('published', true)
190
+                                        ->whereHas('releases', function (Builder $query) use ($releaseType) {
191
+                                            $query->where('release_type_id', $releaseType->id);
192
+                                        })
193
+                                        ->orderBy('release', 'desc')
194
+                                        ->take(intval($this->property('itemLimit')))
195
+                                        ->get();
196 196
 
197 197
         $this->episodes->map(function (Episode $episode) use ($show) {
198 198
             $episode->setRelation('show', $show);
Please login to merge, or discard this patch.
components/EpisodesComponent.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -199,8 +199,8 @@
 block discarded – undo
199 199
         }
200 200
 
201 201
         $query->with('image')
202
-              ->where('published', true)
203
-              ->orderBy('release', 'desc');
202
+                ->where('published', true)
203
+                ->orderBy('release', 'desc');
204 204
 
205 205
         if ($this->tag) {
206 206
             $query->whereHas('tags', function (Builder $q) {
Please login to merge, or discard this patch.
components/EpisodeComponent.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
211 211
 
212 212
         // Generic rules
213 213
         $query->with(['releases', 'releases.release_type', 'image', 'tags'])
214
-              ->where('published', true);
214
+                ->where('published', true);
215 215
 
216 216
         // If latest also order by
217 217
         if($latest) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
         }
193 193
 
194 194
         // Episode slug filter
195
-        if($this->property('episodeSlug')) {
195
+        if ($this->property('episodeSlug')) {
196 196
             // Load specific episode, unless show isn't set
197 197
             $latest = $latest || false;
198 198
 
@@ -214,13 +214,13 @@  discard block
 block discarded – undo
214 214
               ->where('published', true);
215 215
 
216 216
         // If latest also order by
217
-        if($latest) {
217
+        if ($latest) {
218 218
             $query->orderBy('release', 'desc');
219 219
         }
220 220
 
221 221
         $episode = $query->firstOrFail();
222 222
 
223
-        if($setShow) {
223
+        if ($setShow) {
224 224
             // Set show on episode
225 225
             $episode->setRelation('show', $this->show);
226 226
         } else {
Please login to merge, or discard this patch.