@@ -13,7 +13,7 @@ |
||
| 13 | 13 | */ |
| 14 | 14 | public function up() |
| 15 | 15 | { |
| 16 | - Schema::create('collections', function (Blueprint $table) { |
|
| 16 | + Schema::create('collections', function(Blueprint $table) { |
|
| 17 | 17 | $table->increments('id'); |
| 18 | 18 | $table->morphs('collectable'); |
| 19 | 19 | $table->integer('user_id')->unsigned()->index(); |
@@ -20,7 +20,7 @@ discard block |
||
| 20 | 20 | |
| 21 | 21 | $collection = $collectable->collections()->where('user_id', $userId)->first(); |
| 22 | 22 | |
| 23 | - if ( !$collection) { |
|
| 23 | + if (!$collection) { |
|
| 24 | 24 | $collectable->collections()->create([ |
| 25 | 25 | 'user_id' => $userId, |
| 26 | 26 | ]); |
@@ -57,7 +57,7 @@ discard block |
||
| 57 | 57 | $userId = $this->currentUserId(); |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | - if ( !$userId) { |
|
| 60 | + if (!$userId) { |
|
| 61 | 61 | throw InvalidCollector::notDefined(); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -53,7 +53,7 @@ |
||
| 53 | 53 | |
| 54 | 54 | return $query |
| 55 | 55 | ->select("{$collectable->getTable()}.*") |
| 56 | - ->leftJoin('collections', function (JoinClause $join) use ($collectable) { |
|
| 56 | + ->leftJoin('collections', function(JoinClause $join) use ($collectable) { |
|
| 57 | 57 | $join |
| 58 | 58 | ->on('collections.collectable_id', '=', "{$collectable->getTable()}.{$collectable->getKeyName()}") |
| 59 | 59 | ->where('collections.collectable_type', '=', $collectable->getMorphClass()); |