Passed
Branch master (549a47)
by Robert
02:36
created
src/Taggable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,12 +47,12 @@  discard block
 block discarded – undo
47 47
     public static function bootTaggable()
48 48
     {
49 49
         if (static::untagOnDelete()) {
50
-            static::deleting(function ($model) {
50
+            static::deleting(function($model) {
51 51
                 $model->untag();
52 52
             });
53 53
         }
54 54
 
55
-        static::saved(function ($model) {
55
+        static::saved(function($model) {
56 56
             $model->autoTagPostSave();
57 57
         });
58 58
     }
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function getTagsAttribute()
80 80
     {
81
-        return $this->tagged->map(function (Tagged $item) {
81
+        return $this->tagged->map(function(Tagged $item) {
82 82
             return $item->tag;
83 83
         });
84 84
     }
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
      */
123 123
     public function tagNames(): array
124 124
     {
125
-        return $this->tagged->map(function ($item) {
125
+        return $this->tagged->map(function($item) {
126 126
             return $item->tag_name;
127 127
         })->toArray();
128 128
     }
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public function tagSlugs(): array
134 134
     {
135
-        return $this->tagged->map(function ($item) {
135
+        return $this->tagged->map(function($item) {
136 136
             return $item->tag_slug;
137 137
         })->toArray();
138 138
     }
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */
187 187
     public function scopeWithAllTags(Builder $query, $tagNames): Builder
188 188
     {
189
-        if (! is_array($tagNames)) {
189
+        if (!is_array($tagNames)) {
190 190
             $tagNames = func_get_args();
191 191
             array_shift($tagNames);
192 192
         }
@@ -379,7 +379,7 @@  discard block
 block discarded – undo
379 379
 
380 380
     private function assembleTagsForScoping($query, $tagNames)
381 381
     {
382
-        if (! is_array($tagNames)) {
382
+        if (!is_array($tagNames)) {
383 383
             $tagNames = func_get_args();
384 384
             array_shift($tagNames);
385 385
         }
Please login to merge, or discard this patch.
src/TaggingUtility.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
 
26 26
         if (is_string($tagNames)) {
27 27
             $tagNames = explode(',', $tagNames);
28
-        } elseif (! is_array($tagNames)) {
28
+        } elseif (!is_array($tagNames)) {
29 29
             $tagNames = [null];
30 30
         }
31 31
 
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
             'ẳ' => 'a', 'Ẳ' => 'A', 'ẵ' => 'a', 'Ẵ' => 'A', 'ặ' => 'a', 'Ặ' => 'A', 'ẩ' => 'a', 'Ẩ' => 'A',
151 151
             'Ấ' => 'A', 'ấ' => 'a', 'Ầ' => 'A', 'ầ' => 'a', 'Ơ' => 'O', 'ơ' => 'o', 'Đ' => 'D', 'đ' => 'd',
152 152
             'ẫ' => 'a', 'Ẫ' => 'A', 'ậ' => 'a', 'Ậ' => 'A', 'ẻ' => 'e', 'Ẻ' => 'E', 'ẽ' => 'e', 'Ẽ' => 'E',
153
-            'ẹ' => 'e', 'Ẹ' => 'E', 'ế' => 'e', 'Ế' => 'E', 'ề' => 'e', 'Ề' => 'E',  'ể' => 'e', 'Ể' => 'E',
153
+            'ẹ' => 'e', 'Ẹ' => 'E', 'ế' => 'e', 'Ế' => 'E', 'ề' => 'e', 'Ề' => 'E', 'ể' => 'e', 'Ể' => 'E',
154 154
             'ễ' => 'e', 'Ễ' => 'E', 'ệ' => 'e', 'Ệ' => 'E', 'ỉ' => 'i', 'Ỉ' => 'I', 'ĩ' => 'i', 'Ĩ' => 'I',
155 155
             'ị' => 'i', 'Ị' => 'I', 'ỏ' => 'o', 'Ỏ' => 'O', 'ọ' => 'o', 'Ọ' => 'O', 'ố' => 'o', 'Ố' => 'O',
156 156
             'ồ' => 'o', 'Ồ' => 'O', 'ổ' => 'o', 'Ổ' => 'O', 'ỗ' => 'o', 'Ỗ' => 'O', 'ộ' => 'o', 'Ộ' => 'O',
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
         /** @var Tag $model|$tag */
211 211
         $tag = $model::where('slug', '=', $tagSlug)->first();
212 212
 
213
-        if (! $tag) {
213
+        if (!$tag) {
214 214
             $tag = new $model;
215 215
             $tag->name = $tagString;
216 216
             $tag->slug = $tagSlug;
Please login to merge, or discard this patch.
src/Model/Tag.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -128,7 +128,7 @@
 block discarded – undo
128 128
     {
129 129
         $groupSlug = TaggingUtility::normalize($groupName);
130 130
 
131
-        return $query->whereHas('group', function (Builder $query) use ($groupSlug) {
131
+        return $query->whereHas('group', function(Builder $query) use ($groupSlug) {
132 132
             $query->where('slug', $groupSlug);
133 133
         });
134 134
     }
Please login to merge, or discard this patch.
migrations/2016_06_29_073615_create_tag_groups_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 {
8 8
     public function up()
9 9
     {
10
-        Schema::create('tagging_tag_groups', function (Blueprint $table) {
10
+        Schema::create('tagging_tag_groups', function(Blueprint $table) {
11 11
             $table->increments('id');
12 12
             $table->string('slug', 125)->index();
13 13
             $table->string('name', 125);
Please login to merge, or discard this patch.
migrations/2020_03_13_083515_add_description_to_tags_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 {
7 7
     public function up()
8 8
     {
9
-        Schema::table('tagging_tags', function ($table) {
9
+        Schema::table('tagging_tags', function($table) {
10 10
             $table->text('description')->nullable();
11 11
         });
12 12
 
@@ -14,7 +14,7 @@  discard block
 block discarded – undo
14 14
 
15 15
     public function down()
16 16
     {
17
-        Schema::table('tagging_tags', function ($table) {
17
+        Schema::table('tagging_tags', function($table) {
18 18
             $table->dropColumn('description');
19 19
         });
20 20
     }
Please login to merge, or discard this patch.
migrations/2016_06_29_073615_update_tags_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,7 +6,7 @@  discard block
 block discarded – undo
6 6
 {
7 7
     public function up()
8 8
     {
9
-        Schema::table('tagging_tags', function ($table) {
9
+        Schema::table('tagging_tags', function($table) {
10 10
             $table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups');
11 11
         });
12 12
 
@@ -15,7 +15,7 @@  discard block
 block discarded – undo
15 15
     public function down()
16 16
     {
17 17
         Schema::disableForeignKeyConstraints();
18
-        Schema::table('tagging_tags', function ($table) {
18
+        Schema::table('tagging_tags', function($table) {
19 19
             $table->dropForeign('tagging_tags_tag_group_id_foreign');
20 20
         });
21 21
     }
Please login to merge, or discard this patch.
migrations/2014_01_07_073615_create_tags_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 {
8 8
     public function up()
9 9
     {
10
-        Schema::create('tagging_tags', function (Blueprint $table) {
10
+        Schema::create('tagging_tags', function(Blueprint $table) {
11 11
             $table->increments('id');
12 12
             $table->string('slug', 125)->index();
13 13
             $table->string('name', 125);
Please login to merge, or discard this patch.
migrations/2014_01_07_073615_create_tagged_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@
 block discarded – undo
7 7
 {
8 8
     public function up()
9 9
     {
10
-        Schema::create('tagging_tagged', function (Blueprint $table) {
10
+        Schema::create('tagging_tagged', function(Blueprint $table) {
11 11
             $table->increments('id');
12 12
             if (config('tagging.primary_keys_type') == 'string') {
13 13
                 $table->string('taggable_id', 36)->index();
Please login to merge, or discard this patch.
migrations/2023_04_22_143828_add_locale_to_tagging_tags_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -8,14 +8,14 @@
 block discarded – undo
8 8
 {
9 9
     public function up()
10 10
     {
11
-        Schema::table('tagging_tags', function (Blueprint $table) {
11
+        Schema::table('tagging_tags', function(Blueprint $table) {
12 12
             $table->string('locale', 5)->nullable();
13 13
         });
14 14
     }
15 15
 
16 16
     public function down()
17 17
     {
18
-        Schema::table('tagging_tags', function (Blueprint $table) {
18
+        Schema::table('tagging_tags', function(Blueprint $table) {
19 19
             $table->dropColumn('locale');
20 20
         });
21 21
     }
Please login to merge, or discard this patch.