Completed
Push — master ( 36ca24...91d14d )
by Matthew
02:30
created
updates/create_tags_table.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@
 block discarded – undo
30 30
                 $table->primary(['episode_id', 'tag_id']);
31 31
 
32 32
                 $table->foreign('episode_id')->references('id')->on('cosmicradiotv_podcast_episodes')
33
-                      ->onUpdate('cascade')->onDelete('cascade');
33
+                        ->onUpdate('cascade')->onDelete('cascade');
34 34
                 $table->foreign('tag_id')->references('id')->on('cosmicradiotv_podcast_tags')
35
-                      ->onUpdate('cascade')->onDelete('cascade');
35
+                        ->onUpdate('cascade')->onDelete('cascade');
36 36
             });
37 37
         });
38 38
     }
Please login to merge, or discard this patch.
updates/create_episodes_table.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@
 block discarded – undo
30 30
                 $table->timestamps();
31 31
 
32 32
                 $table->foreign('show_id')->references('id')->on('cosmicradiotv_podcast_shows')
33
-                      ->onUpdate('cascade');
33
+                        ->onUpdate('cascade');
34 34
                 $table->unique(['show_id', 'slug']);
35 35
             });
36 36
         });
Please login to merge, or discard this patch.
updates/create_releases_table.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@
 block discarded – undo
36 36
                 $table->timestamps();
37 37
 
38 38
                 $table->foreign('episode_id')->references('id')->on('cosmicradiotv_podcast_episodes')
39
-                      ->onUpdate('cascade');
39
+                        ->onUpdate('cascade');
40 40
                 $table->foreign('release_type_id')->references('id')->on('cosmicradiotv_podcast_release_types')
41
-                      ->onUpdate('cascade');
41
+                        ->onUpdate('cascade');
42 42
 
43 43
             });
44 44
         });
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,8 @@
 block discarded – undo
7 7
 use October\Rain\Database\Updates\Migration;
8 8
 use Schema;
9 9
 
10
-class CreateReleasesTable extends Migration {
10
+class CreateReleasesTable extends Migration
11
+{
11 12
 
12 13
     /**
13 14
      * Migration
Please login to merge, or discard this patch.
updates/add_sort_order_to_release_types.php 1 patch
Indentation   +24 added lines, -24 removed lines patch added patch discarded remove patch
@@ -9,29 +9,29 @@
 block discarded – undo
9 9
 
10 10
 class AddSortOrderToReleaseTypes extends Migration
11 11
 {
12
-	/**
13
-	 * Migration
14
-	 */
15
-	public function up()
16
-	{
17
-		DB::transaction(function() {
18
-			Schema::table('cosmicradiotv_podcast_release_types', function (Blueprint $table) {
19
-				$table->unsignedInteger('sort_order');
20
-			});
21
-		});
22
-	}
12
+    /**
13
+     * Migration
14
+     */
15
+    public function up()
16
+    {
17
+        DB::transaction(function() {
18
+            Schema::table('cosmicradiotv_podcast_release_types', function (Blueprint $table) {
19
+                $table->unsignedInteger('sort_order');
20
+            });
21
+        });
22
+    }
23 23
 
24
-	/**
25
-	 * Rollback
26
-	 */
27
-	public function down()
28
-	{
29
-		DB::transaction(function() {
30
-			Schema::table('cosmicradiotv_podcast_release_types', function (Blueprint $table) {
31
-				$table->dropColumn([
32
-					'sort_order',
33
-				]);
34
-			});
35
-		});
36
-	}
24
+    /**
25
+     * Rollback
26
+     */
27
+    public function down()
28
+    {
29
+        DB::transaction(function() {
30
+            Schema::table('cosmicradiotv_podcast_release_types', function (Blueprint $table) {
31
+                $table->dropColumn([
32
+                    'sort_order',
33
+                ]);
34
+            });
35
+        });
36
+    }
37 37
 }
38 38
\ No newline at end of file
Please login to merge, or discard this patch.
controllers/Episodes.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 use CosmicRadioTV\Podcast\Models\Episode;
7 7
 use CosmicRadioTV\Podcast\Models\Show;
8 8
 /**
9
- * Episodes Back-end Controller
10
- */
9
+     * Episodes Back-end Controller
10
+     */
11 11
 class Episodes extends Controller
12 12
 {
13 13
     public $implement = [
Please login to merge, or discard this patch.
Braces   +5 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,8 +34,9 @@  discard block
 block discarded – undo
34 34
         if (($checkedIds = post('checked')) && is_array($checkedIds) && count($checkedIds)) {
35 35
 
36 36
             foreach ($checkedIds as $episodeId) {
37
-                if (!$episode = Episode::find($episodeId))
38
-                    continue;
37
+                if (!$episode = Episode::find($episodeId)) {
38
+                                    continue;
39
+                }
39 40
 
40 41
                 $episode->delete();
41 42
             }
@@ -46,7 +47,8 @@  discard block
 block discarded – undo
46 47
         return $this->listRefresh();
47 48
     }
48 49
 
49
-    public function listExtendQuery($query, $definition = null) {
50
+    public function listExtendQuery($query, $definition = null)
51
+    {
50 52
         $user = BackendAuth::getUser();
51 53
 
52 54
         if (!$user->hasAccess(['cosmicradiotv.podcast.access_episodes_all'])) {
Please login to merge, or discard this patch.
models/Episode.php 1 patch
Braces   +8 added lines, -4 removed lines patch added patch discarded remove patch
@@ -103,7 +103,8 @@  discard block
 block discarded – undo
103 103
      * @param  boolean $ofShow If true returns the next episode of the same show
104 104
      * @return Episode         The next episode
105 105
      */
106
-    public function nextCached($ofShow = false) {
106
+    public function nextCached($ofShow = false)
107
+    {
107 108
         if (empty($this->nextEpisodeCache[$ofShow])) {
108 109
             $this->nextEpisodeCache[$ofShow] = $this->next($ofShow);
109 110
         }
@@ -115,7 +116,8 @@  discard block
 block discarded – undo
115 116
      * @param  boolean $ofShow If true returns the next episode of the same show
116 117
      * @return Episode         The previous episode
117 118
      */
118
-    public function previousCached($ofShow = false) {
119
+    public function previousCached($ofShow = false)
120
+    {
119 121
         if (empty($this->previousEpisodeCache[$ofShow])) {
120 122
             $this->previousEpisodeCache[$ofShow] = $this->previous($ofShow);
121 123
         }
@@ -127,7 +129,8 @@  discard block
 block discarded – undo
127 129
      * @param  boolean  $ofShow If true returns the next episode of the same show
128 130
      * @return Episode          The next episode
129 131
      */
130
-    public function next($ofShow = false) {
132
+    public function next($ofShow = false)
133
+    {
131 134
         $query = self::query();
132 135
         if ($ofShow) {
133 136
             $query = $query->where('show_id',$this->show_id);
@@ -139,7 +142,8 @@  discard block
 block discarded – undo
139 142
      * @param  boolean  $ofShow If true returns the previous episode of the same show
140 143
      * @return Episode          The previous episode
141 144
      */
142
-    public function previous($ofShow = false) {
145
+    public function previous($ofShow = false)
146
+    {
143 147
         $query = self::query();
144 148
         if ($ofShow) {
145 149
             $query = $query->where('show_id',$this->show_id);
Please login to merge, or discard this patch.
models/Release.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
             curl_exec($ch);
90 90
             
91 91
             if (!curl_errno($ch)) {
92
-                 $this->size = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
92
+                    $this->size = curl_getinfo($ch, CURLINFO_CONTENT_LENGTH_DOWNLOAD);
93 93
             }
94 94
             curl_close($ch);
95 95
         }
Please login to merge, or discard this patch.
Braces   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,8 @@
 block discarded – undo
76 76
     /**
77 77
      * Used to automatically set the size of the release (if size is set to 0)
78 78
      */
79
-    public function beforeSave() {
79
+    public function beforeSave()
80
+    {
80 81
         $dirty = $this->getDirty();
81 82
         if (in_array($this->release_type->type,['video','audio']) && $this->size == 0 && (isset($dirty['size']) || isset($dirty['url']))) {
82 83
             $ch = curl_init();
Please login to merge, or discard this patch.
classes/ComponentBase.php 1 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.