Completed
Push — master ( 0440a4...ed2db0 )
by Gino
01:30
created
components/SeriesNavigation.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,8 +109,8 @@
 block discarded – undo
109 109
     {
110 110
         $this->postPage   = $this->property('postPage');
111 111
         $this->seriesPage = $this->property('seriesPage');
112
-        $this->slug       = $this->page['slug'] = $this->property('slug');
113
-        $this->series     = $this->page['series'] = $this->listSeries();
112
+        $this->slug       = $this->page[ 'slug' ] = $this->property('slug');
113
+        $this->series     = $this->page[ 'series' ] = $this->listSeries();
114 114
     }
115 115
 
116 116
     /**
Please login to merge, or discard this patch.
classes/migrationcommand/migrations/PkleindienstBlogSeriesMigration.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
 {
21 21
     const PLUGIN_NAME = 'PKleindienst.BlogSeries';
22 22
 
23
-    private $migratedSeriesIds = [];
23
+    private $migratedSeriesIds = [ ];
24 24
 
25 25
     /**
26 26
      * Migrate plugin data
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
                 )
91 91
             );
92 92
 
93
-            $this->migratedSeriesIds[$blogTaxonomySeries->id] = $seriesRecord->id;
93
+            $this->migratedSeriesIds[ $blogTaxonomySeries->id ] = $seriesRecord->id;
94 94
         }
95 95
 
96 96
         $this->command->info('All series have been migrated' . PHP_EOL);
@@ -117,13 +117,13 @@  discard block
 block discarded – undo
117 117
 
118 118
         $migratedSeries = array_flip($this->migratedSeriesIds);
119 119
 
120
-        DB::transaction(function () use ($relatedSeries, $migratedSeries) {
120
+        DB::transaction(function() use ($relatedSeries, $migratedSeries) {
121 121
             foreach ($relatedSeries as $relationRecord) {
122
-                $seriesId = $migratedSeries[$relationRecord->series_id];
123
-                $relatedSeriesId = $migratedSeries[$relationRecord->related_id];
122
+                $seriesId = $migratedSeries[ $relationRecord->series_id ];
123
+                $relatedSeriesId = $migratedSeries[ $relationRecord->related_id ];
124 124
 
125 125
                 DB::table('ginopane_blogtaxonomy_related_series')->insert(
126
-                    ['series_id' => $seriesId, 'related_series_id' => $relatedSeriesId]
126
+                    [ 'series_id' => $seriesId, 'related_series_id' => $relatedSeriesId ]
127 127
                 );
128 128
 
129 129
                 $this->command->line(
@@ -158,11 +158,11 @@  discard block
 block discarded – undo
158 158
 
159 159
         $migratedSeries = array_flip($this->migratedSeriesIds);
160 160
 
161
-        DB::transaction(function () use ($migratedSeries) {
161
+        DB::transaction(function() use ($migratedSeries) {
162 162
             foreach ($migratedSeries as $oldSeriesId => $newSeriesId) {
163 163
                 if (DB::table('rainlab_blog_posts')
164 164
                     ->where('series_id', $oldSeriesId)
165
-                    ->update(['ginopane_blogtaxonomy_series_id' => $newSeriesId])
165
+                    ->update([ 'ginopane_blogtaxonomy_series_id' => $newSeriesId ])
166 166
                 ) {
167 167
                     $this->command->line(
168 168
                         sprintf(
Please login to merge, or discard this patch.
classes/PostListAbstract.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
     /**
25 25
      * @var Collection | array
26 26
      */
27
-    public $posts = [];
27
+    public $posts = [ ];
28 28
 
29 29
     /**
30 30
      * Parameter to use for the page number
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
         $this->pageParam = $this->paramName('page');
244 244
         $this->currentPage = (int)$this->property('page', 1) ?: (int)post('page');
245 245
         $this->resultsPerPage = (int)$this->property('resultsPerPage')
246
-            ?: $this->defineProperties()['resultsPerPage']['default'];
246
+            ?: $this->defineProperties()[ 'resultsPerPage' ][ 'default' ];
247 247
     }
248 248
 
249 249
     /**
Please login to merge, or discard this patch.
updates/create_related_series_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,12 +50,12 @@
 block discarded – undo
50 50
         if (!Schema::hasTable(Series::RELATED_SERIES_TABLE_NAME)) {
51 51
             Schema::create(
52 52
                 Series::RELATED_SERIES_TABLE_NAME,
53
-                static function ($table) {
53
+                static function($table) {
54 54
                     $table->engine = 'InnoDB';
55 55
 
56 56
                     $table->integer('series_id')->unsigned();
57 57
                     $table->integer('related_series_id')->unsigned();
58
-                    $table->index(['series_id', 'related_series_id'], 'related_series_index');
58
+                    $table->index([ 'series_id', 'related_series_id' ], 'related_series_index');
59 59
 
60 60
                     $table
61 61
                         ->foreign('series_id', 'Series reference')
Please login to merge, or discard this patch.
components/RelatedSeries.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,10 +73,10 @@
 block discarded – undo
73 73
         $series = Series::whereTranslatable('slug', $this->property('series'))
74 74
             ->with(
75 75
                 [
76
-                    'related_series' => static function ($query) {
76
+                    'related_series' => static function($query) {
77 77
                         $query->withCount(
78 78
                             [
79
-                                'posts' => static function ($query) {
79
+                                'posts' => static function($query) {
80 80
                                     $query->isPublished();
81 81
                                 }
82 82
                             ]
Please login to merge, or discard this patch.
models/Series.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
      *
42 42
      * @var array
43 43
      */
44
-    public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel'];
44
+    public $implement = [ '@RainLab.Translate.Behaviors.TranslatableModel' ];
45 45
 
46 46
     /**
47 47
      * Translatable properties, indexed property will be available in queries
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
     ];
71 71
 
72 72
     public $morphToMany = [
73
-        'tags' => [Tag::class, 'name' => Tag::PIVOT_COLUMN]
73
+        'tags' => [ Tag::class, 'name' => Tag::PIVOT_COLUMN ]
74 74
     ];
75 75
 
76 76
     /**
@@ -146,7 +146,7 @@  discard block
 block discarded – undo
146 146
     /**
147 147
      * @var array
148 148
      */
149
-    protected $slugs = ['slug' => 'title'];
149
+    protected $slugs = [ 'slug' => 'title' ];
150 150
 
151 151
     /**
152 152
      * @param Builder $query
Please login to merge, or discard this patch.
components/TagList.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
     /**
26 26
      * @var Collection | array
27 27
      */
28
-    public $tags = [];
28
+    public $tags = [ ];
29 29
 
30 30
     /**
31 31
      * Reference to the page name for linking to tag page
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
 
365 365
         $this->tagsPageUrl = $this->controller->pageUrl($this->tagsPage);
366 366
 
367
-        $this->setUrls($tags, $this->tagPage, $this->controller, ['tag' => $this->urlProperty($tagComponent, 'tag')]);
367
+        $this->setUrls($tags, $this->tagPage, $this->controller, [ 'tag' => $this->urlProperty($tagComponent, 'tag') ]);
368 368
     }
369 369
 
370 370
     /**
@@ -406,18 +406,18 @@  discard block
 block discarded – undo
406 406
 
407 407
     private function prepareVars()
408 408
     {
409
-        $this->tagPage = (string) $this->getProperty('tagPage');
410
-        $this->tagsPage = (string) $this->getProperty('tagsPage');
409
+        $this->tagPage = (string)$this->getProperty('tagPage');
410
+        $this->tagsPage = (string)$this->getProperty('tagsPage');
411 411
 
412 412
         $this->orderBy = $this->getProperty('orderBy');
413 413
         $this->postSlug = $this->getProperty('postSlug');
414
-        $this->fetchPosts = (bool) $this->getProperty('fetchPosts');
415
-        $this->displayEmpty = (bool) $this->getProperty('displayEmpty');
416
-        $this->limit = (int) $this->getProperty('limit');
417
-        $this->exposeTotalCount = (bool) $this->getProperty('exposeTotalCount');
418
-        $this->enableTagFilter = (string) $this->getProperty('enableTagFilter');
419
-        $this->includeSeriesTags = (bool) $this->getProperty('includeSeriesTags');
420
-        $this->fetchSeriesPostCount = (bool) $this->getProperty('fetchSeriesPostCount');
421
-        $this->debugOutput = (bool) $this->getProperty('debugOutput');
414
+        $this->fetchPosts = (bool)$this->getProperty('fetchPosts');
415
+        $this->displayEmpty = (bool)$this->getProperty('displayEmpty');
416
+        $this->limit = (int)$this->getProperty('limit');
417
+        $this->exposeTotalCount = (bool)$this->getProperty('exposeTotalCount');
418
+        $this->enableTagFilter = (string)$this->getProperty('enableTagFilter');
419
+        $this->includeSeriesTags = (bool)$this->getProperty('includeSeriesTags');
420
+        $this->fetchSeriesPostCount = (bool)$this->getProperty('fetchSeriesPostCount');
421
+        $this->debugOutput = (bool)$this->getProperty('debugOutput');
422 422
     }
423 423
 }
Please login to merge, or discard this patch.
controllers/Tags.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      */
56 56
     public function onBulkDelete()
57 57
     {
58
-        if ($checkedIds = (array)post('checked', [])) {
58
+        if ($checkedIds = (array)post('checked', [ ])) {
59 59
             $delete = Tag::whereIn('id', $checkedIds)->delete();
60 60
         }
61 61
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
      */
78 78
     public function index_onRemoveOrphanedTags()
79 79
     {
80
-        if (!Tag::has('posts', 0)->has('series', 0)->count() ) {
80
+        if (!Tag::has('posts', 0)->has('series', 0)->count()) {
81 81
             Flash::warning(e(trans(Plugin::LOCALIZATION_KEY . 'form.tags.no_orphaned_tags')));
82 82
 
83 83
             return;
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
         $tag = Tag::whereId($recordId)->first();
109 109
 
110 110
         if ($tag !== null) {
111
-            $this->pageTitle = trans(Plugin::LOCALIZATION_KEY . 'form.tags.edit_title', ['tag' => $tag->name]);
111
+            $this->pageTitle = trans(Plugin::LOCALIZATION_KEY . 'form.tags.edit_title', [ 'tag' => $tag->name ]);
112 112
         } else {
113 113
             $this->pageTitle = trans(Plugin::LOCALIZATION_KEY . 'form.tags.tag_does_not_exist');
114 114
         }
Please login to merge, or discard this patch.
updates/create_polymorphic_tag_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 
56 56
             Schema::create(
57 57
                 Tag::PIVOT_TABLE,
58
-                static function ($table) use ($pivotColumnId, $pivotColumnType) {
58
+                static function($table) use ($pivotColumnId, $pivotColumnType) {
59 59
                     $table->engine = 'InnoDB';
60 60
 
61 61
                     $table->integer('tag_id')->unsigned()->nullable()->default(null);
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
                     $table->string($pivotColumnType);
64 64
 
65 65
                     $table->index(
66
-                        ['tag_id', Tag::PIVOT_COLUMN . '_id', Tag::PIVOT_COLUMN . '_type'],
66
+                        [ 'tag_id', Tag::PIVOT_COLUMN . '_id', Tag::PIVOT_COLUMN . '_type' ],
67 67
                         'ginopane_blogtaxonomy_taggable_index'
68 68
                     );
69 69
 
Please login to merge, or discard this patch.