Completed
Push — laravel-5 ( 084924...f66d04 )
by Robert
03:24
created
src/Model/Tag.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function save(array $options = [])
41 41
     {
42
-        if(strlen($this->name) < 1) {
42
+        if (strlen($this->name) < 1) {
43 43
             throw new \RuntimeException('Cannot save a tag with an empty name');
44 44
         }
45 45
 
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
             return $this;
67 67
         } else {
68
-            throw new \RuntimeException('No Tag Group found: '. $group);
68
+            throw new \RuntimeException('No Tag Group found: '.$group);
69 69
         }
70 70
     }
71 71
 
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
     {
122 122
         $groupSlug = TaggingUtility::normalize($groupName);
123 123
 
124
-        return $query->whereHas('group', function (Builder $query) use ($groupSlug) {
124
+        return $query->whereHas('group', function(Builder $query) use ($groupSlug) {
125 125
             $query->where('slug', $groupSlug);
126 126
         });
127 127
     }
Please login to merge, or discard this patch.
migrations/2014_01_07_073615_create_tags_table.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -5,20 +5,20 @@
 block discarded – undo
5 5
 
6 6
 class CreateTagsTable extends Migration
7 7
 {
8
-	public function up()
9
-	{
10
-		Schema::create('tagging_tags', function(Blueprint $table) {
11
-			$table->increments('id');
12
-			$table->string('slug', 125)->index();
13
-			$table->string('name', 125);
14
-			$table->boolean('suggest')->default(false);
15
-			$table->integer('count')->unsigned()->default(0); // count of how many times this tag was used
8
+    public function up()
9
+    {
10
+        Schema::create('tagging_tags', function(Blueprint $table) {
11
+            $table->increments('id');
12
+            $table->string('slug', 125)->index();
13
+            $table->string('name', 125);
14
+            $table->boolean('suggest')->default(false);
15
+            $table->integer('count')->unsigned()->default(0); // count of how many times this tag was used
16 16
             $table->integer('tag_group_id')->unsigned()->nullable();
17
-		});
18
-	}
17
+        });
18
+    }
19 19
 
20
-	public function down()
21
-	{
22
-		Schema::drop('tagging_tags');
23
-	}
20
+    public function down()
21
+    {
22
+        Schema::drop('tagging_tags');
23
+    }
24 24
 }
Please login to merge, or discard this patch.
migrations/2016_06_29_073615_update_tags_table.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -5,20 +5,20 @@
 block discarded – undo
5 5
 
6 6
 class UpdateTagsTable extends Migration {
7 7
 
8
-	public function up()
9
-	{
10
-		Schema::table('tagging_tags', function ($table) {
11
-			$table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups');
12
-		});
8
+    public function up()
9
+    {
10
+        Schema::table('tagging_tags', function ($table) {
11
+            $table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups');
12
+        });
13 13
 
14
-	}
14
+    }
15 15
 
16 16
 
17
-	public function down()
18
-	{
17
+    public function down()
18
+    {
19 19
         Schema::disableForeignKeyConstraints();
20
-		Schema::table('tagging_tags', function ($table) {
21
-			$table->dropForeign('tagging_tags_tag_group_id_foreign');
22
-		});
23
-	}
20
+        Schema::table('tagging_tags', function ($table) {
21
+            $table->dropForeign('tagging_tags_tag_group_id_foreign');
22
+        });
23
+    }
24 24
 }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 	public function up()
9 9
 	{
10
-		Schema::table('tagging_tags', function ($table) {
10
+		Schema::table('tagging_tags', function($table) {
11 11
 			$table->foreign('tag_group_id')->references('id')->on('tagging_tag_groups');
12 12
 		});
13 13
 
@@ -17,7 +17,7 @@  discard block
 block discarded – undo
17 17
 	public function down()
18 18
 	{
19 19
         Schema::disableForeignKeyConstraints();
20
-		Schema::table('tagging_tags', function ($table) {
20
+		Schema::table('tagging_tags', function($table) {
21 21
 			$table->dropForeign('tagging_tags_tag_group_id_foreign');
22 22
 		});
23 23
 	}
Please login to merge, or discard this patch.