Completed
Push — master ( 2830aa...591d0b )
by Carlos
11:07 queued 08:22
created
src/Follow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -118,7 +118,7 @@
 block discarded – undo
118 118
             $targets = [$targets];
119 119
         }
120 120
 
121
-        $result->ids = array_map(function ($target) use ($result) {
121
+        $result->ids = array_map(function($target) use ($result) {
122 122
             if ($target instanceof Model) {
123 123
                 $result->classname = get_class($target);
124 124
 
Please login to merge, or discard this patch.
database/migrations/2018_06_29_032244_create_laravel_follow_tables.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
      */
20 20
     public function up()
21 21
     {
22
-        Schema::create(config('follow.followable_table', 'followables'), function (Blueprint $table) {
22
+        Schema::create(config('follow.followable_table', 'followables'), function(Blueprint $table) {
23 23
             $userForeignKey = config('follow.users_table_foreign_key', 'user_id');
24 24
             $table->unsignedInteger($userForeignKey);
25 25
             $table->unsignedInteger('followable_id');
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
      */
41 41
     public function down()
42 42
     {
43
-        Schema::table(config('follow.followable_table', 'followables'), function ($table) {
43
+        Schema::table(config('follow.followable_table', 'followables'), function($table) {
44 44
             $table->dropForeign(config('follow.followable_table', 'followables').'_user_id_foreign');
45 45
         });
46 46
 
Please login to merge, or discard this patch.
src/Traits/CanBeFollowed.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
                     ->wherePivot('relation', '=', Follow::RELATION_FOLLOW)
48 48
                     ->withPivot('followable_type', 'relation', 'created_at')
49 49
                     ->addSelect("{$userTable}.*", DB::raw("pivot_followables.{$foreignKey} IS NOT NULL AS pivot_each_other"))
50
-                    ->leftJoin("{$table} as pivot_followables", function ($join) use ($table, $class, $foreignKey) {
50
+                    ->leftJoin("{$table} as pivot_followables", function($join) use ($table, $class, $foreignKey) {
51 51
                         $join->on('pivot_followables.followable_type', '=', DB::raw(\addcslashes("'{$class}'", '\\')))
52 52
                             ->on('pivot_followables.followable_id', '=', "{$table}.{$foreignKey}")
53 53
                             ->on("pivot_followables.{$foreignKey}", '=', "{$table}.followable_id");
Please login to merge, or discard this patch.
src/Traits/CanFollow.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
                     ->wherePivot('relation', '=', Follow::RELATION_FOLLOW)
106 106
                     ->withPivot('followable_type', 'relation', 'created_at')
107 107
                     ->addSelect("{$targetTable}.*", DB::raw("pivot_followables.{$foreignKey} IS NOT NULL AS pivot_each_other"))
108
-                    ->leftJoin("{$table} as pivot_followables", function ($join) use ($table, $class, $foreignKey) {
108
+                    ->leftJoin("{$table} as pivot_followables", function($join) use ($table, $class, $foreignKey) {
109 109
                         $join->on('pivot_followables.followable_type', '=', DB::raw(\addcslashes("'{$class}'", '\\')))
110 110
                             ->on('pivot_followables.followable_id', '=', "{$table}.{$foreignKey}")
111 111
                             ->on("pivot_followables.{$foreignKey}", '=', "{$table}.followable_id");
Please login to merge, or discard this patch.