Completed
Pull Request — master (#2)
by Vojta
01:55
created
Plugin.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,18 +17,18 @@
 block discarded – undo
17 17
                 'label' => 'Reviews',
18 18
                 'url' => Backend::url('vojtasvoboda/reviews/reviews'),
19 19
                 'icon' => 'icon-star-half-o',
20
-                'permissions' => ['vojtasvoboda.reviews.*'],
20
+                'permissions' => [ 'vojtasvoboda.reviews.*' ],
21 21
                 'order' => 510,
22 22
                 'sideMenu' => [
23 23
                     'reviews' => [
24 24
                         'label' => 'Reviews',
25 25
                         'url' => Backend::url('vojtasvoboda/reviews/reviews'),
26 26
                         'icon' => 'icon-star-half-o',
27
-                        'permissions' => ['vojtasvoboda.reviews.reviews'],
27
+                        'permissions' => [ 'vojtasvoboda.reviews.reviews' ],
28 28
                         'order' => 100,
29 29
                     ],
30 30
                     'categories' => [
31
-                        'permissions' => ['vojtasvoboda.reviews.categories'],
31
+                        'permissions' => [ 'vojtasvoboda.reviews.categories' ],
32 32
                         'label' => 'Categories',
33 33
                         'icon' => 'icon-folder',
34 34
                         'url' => Backend::url('vojtasvoboda/reviews/categories'),
Please login to merge, or discard this patch.
facades/ReviewsFacade.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@
 block discarded – undo
47 47
         $query = $this->reviews->isApproved()->orderBy('sort_order');
48 48
 
49 49
         if ($category !== null) {
50
-            $query->whereHas('categories', function ($query) use ($category) {
50
+            $query->whereHas('categories', function($query) use ($category) {
51 51
                 $query->where('category_id', $category->id);
52 52
             });
53 53
         }
Please login to merge, or discard this patch.
models/Category.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
 
14 14
     use ValidationTrait;
15 15
 
16
-    public $implement = ['@RainLab.Translate.Behaviors.TranslatableModel'];
16
+    public $implement = [ '@RainLab.Translate.Behaviors.TranslatableModel' ];
17 17
 
18 18
     public $table = 'vojtasvoboda_reviews_categories';
19 19
 
@@ -24,16 +24,16 @@  discard block
 block discarded – undo
24 24
         'description' => 'max:10000',
25 25
     ];
26 26
 
27
-    public $translatable = ['name', 'slug', 'description'];
27
+    public $translatable = [ 'name', 'slug', 'description' ];
28 28
 
29
-    public $dates = ['created_at', 'updated_at', 'deleted_at'];
29
+    public $dates = [ 'created_at', 'updated_at', 'deleted_at' ];
30 30
 
31 31
     public $attachOne = [
32
-        'image' => ['System\Models\File'],
32
+        'image' => [ 'System\Models\File' ],
33 33
     ];
34 34
 
35 35
     public $belongsToMany = [
36
-        'reviews' => ['VojtaSvoboda\Reviews\Models\Review',
36
+        'reviews' => [ 'VojtaSvoboda\Reviews\Models\Review',
37 37
             'table' => 'vojtasvoboda_reviews_review_category',
38 38
             'order' => 'name desc',
39 39
             'scope' => 'isEnabled',
Please login to merge, or discard this patch.
components/Reviews.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
         if ($categorySlug = $this->property('categoryFilter')) {
37 37
             $category = $this->getCategory($categorySlug);
38 38
         }
39
-        $this->page['category'] = $category;
40
-        $this->page['reviews'] = $this->reviews($category);
39
+        $this->page[ 'category' ] = $category;
40
+        $this->page[ 'reviews' ] = $this->reviews($category);
41 41
     }
42 42
 
43 43
     /**
Please login to merge, or discard this patch.
updates/create_review_category_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
             $table->increments('id')->unsigned();
15 15
             $table->integer('review_id')->unsigned()->nullable()->default(null);
16 16
             $table->integer('category_id')->unsigned()->nullable()->default(null);
17
-            $table->index(['review_id', 'category_id']);
17
+            $table->index([ 'review_id', 'category_id' ]);
18 18
             $table->foreign('review_id')->references('id')->on('vojtasvoboda_reviews_reviews')->onDelete('cascade');
19 19
             $table->foreign('category_id')->references('id')->on('vojtasvoboda_reviews_categories')->onDelete('cascade');
20 20
             $table->timestamps();
Please login to merge, or discard this patch.