Passed
Branch master (a6d2a4)
by xiao
06:38
created
Category
database/migrations/2018_11_01_083339_create_collections_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
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();
Please login to merge, or discard this patch.
src/Collectable/Services/CollectableService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
57 57
             $userId = $this->currentUserId();
58 58
         }
59 59
 
60
-        if ( !$userId) {
60
+        if (!$userId) {
61 61
             throw InvalidCollector::notDefined();
62 62
         }
63 63
 
Please login to merge, or discard this patch.
src/Collectable/Models/Traits/Collectable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
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());
Please login to merge, or discard this patch.