Completed
Push — master ( b773c5...074f4e )
by Gino
06:18 queued 04:58
created
components/RelatedPosts.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
     /**
24 24
      * @var Collection | array
25 25
      */
26
-    public $posts = [];
26
+    public $posts = [ ];
27 27
 
28 28
     /**
29 29
      * Reference to the page name for linking to posts
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
 
127 127
     private function prepareVars()
128 128
     {
129
-        $this->orderBy = $this->page['orderBy'] = $this->property('orderBy');
129
+        $this->orderBy = $this->page[ 'orderBy' ] = $this->property('orderBy');
130 130
 
131 131
         // Page links
132
-        $this->postPage = $this->page['postPage' ] = $this->property('postPage');
132
+        $this->postPage = $this->page[ 'postPage' ] = $this->property('postPage');
133 133
     }
134 134
 
135 135
     public function getPostPageOptions()
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
 
165 165
         $query = Post::isPublished()
166 166
             ->where('id', '<>', $post->id)
167
-            ->whereHas('tags', function ($tag) use ($tagIds) {
167
+            ->whereHas('tags', function($tag) use ($tagIds) {
168 168
                 $tag->whereIn('id', $tagIds);
169 169
             })
170 170
             ->with('tags');
Please login to merge, or discard this patch.
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.
components/SeriesPosts.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
      */
65 65
     protected function getPostsQuery()
66 66
     {
67
-        $query = Post::whereHas('series', function ($query) {
67
+        $query = Post::whereHas('series', function($query) {
68 68
             $query->whereTranslatable('slug', $this->series->slug);
69 69
         })->isPublished();
70 70
 
Please login to merge, or discard this patch.
classes/ComponentAbstract.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
                 );
75 75
 
76 76
                 if (!empty($this->categoryPage) && $post->categories->count()) {
77
-                    $post->categories->each(function ($category) use ($blogPostsComponent) {
77
+                    $post->categories->each(function($category) use ($blogPostsComponent) {
78 78
                         /** @var Category $category */
79 79
                         $category->setUrl(
80 80
                             $this->categoryPage,
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
         if ($component !== null && ($property = $component->property($name))) {
107 107
             preg_match('/{{ :([^ ]+) }}/', $property, $matches);
108 108
 
109
-            if (isset($matches[1])) {
110
-                $property = $matches[1];
109
+            if (isset($matches[ 1 ])) {
110
+                $property = $matches[ 1 ];
111 111
             }
112 112
         } else {
113 113
             $property = $name;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
      */
128 128
     public function getProperty(string $property, $default = null)
129 129
     {
130
-        return $this->property($property, $this->defineProperties()[$property]['default'] ?? $default);
130
+        return $this->property($property, $this->defineProperties()[ $property ][ 'default' ] ?? $default);
131 131
     }
132 132
 
133 133
     /**
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.