Passed
Pull Request — main (#1)
by
unknown
11:42
created
src/Traits/HasContacts.php 1 patch
Spacing   +6 added lines, -8 removed lines patch added patch discarded remove patch
@@ -20,7 +20,7 @@  discard block
 block discarded – undo
20 20
      */
21 21
     public static function bootHasContacts()
22 22
     {
23
-        static::deleting(function (self $model) {
23
+        static::deleting(function(self $model) {
24 24
             if (method_exists($model, 'isForceDeleting') && $model->isForceDeleting()) {
25 25
                 $model->contacts()->forceDelete();
26 26
 
@@ -67,14 +67,14 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $contacts = collect($contacts)
69 69
             ->flatten()
70
-            ->map(function ($contact) {
70
+            ->map(function($contact) {
71 71
                 if (empty($contact)) {
72 72
                     return false;
73 73
                 }
74 74
 
75 75
                 return $this->getStoredContact($contact);
76 76
             })
77
-            ->filter(function ($contact) {
77
+            ->filter(function($contact) {
78 78
                 return $contact instanceof Contact;
79 79
             })
80 80
             ->map->id
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
             $class = \get_class($model);
90 90
 
91 91
             $class::saved(
92
-                function ($object) use ($contacts, $model) {
92
+                function($object) use ($contacts, $model) {
93 93
                     static $modelLastFiredOn;
94 94
                     if ($modelLastFiredOn !== null && $modelLastFiredOn === $model) {
95 95
                         return;
@@ -191,14 +191,12 @@  discard block
 block discarded – undo
191 191
     {
192 192
         if (is_int($contacts) && $this->hasContact($contacts)) {
193 193
             return $force ?
194
-                    $this->contacts()->where('id', $contacts)->forceDelete() :
195
-                    $this->contacts()->where('id', $contacts)->delete();
194
+                    $this->contacts()->where('id', $contacts)->forceDelete() : $this->contacts()->where('id', $contacts)->delete();
196 195
         }
197 196
 
198 197
         if ($contacts instanceof Contact && $this->hasContact($contacts)) {
199 198
             return $force ?
200
-                    $this->contacts()->where('id', $contacts->id)->forceDelete() :
201
-                    $this->contacts()->where('id', $contacts->id)->delete();
199
+                    $this->contacts()->where('id', $contacts->id)->forceDelete() : $this->contacts()->where('id', $contacts->id)->delete();
202 200
         }
203 201
 
204 202
         if (is_array($contacts)) {
Please login to merge, or discard this patch.
src/ContactsServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
         $filesystem = $this->app->make(Filesystem::class);
60 60
 
61 61
         return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR)
62
-            ->flatMap(function ($path) use ($filesystem, $migrationFileName) {
62
+            ->flatMap(function($path) use ($filesystem, $migrationFileName) {
63 63
                 return $filesystem->glob($path.'*_'.$migrationFileName);
64 64
             })
65 65
             ->push($this->app->databasePath()."/migrations/{$timestamp}_{$migrationFileName}")
Please login to merge, or discard this patch.
src/Models/Contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -11,7 +11,7 @@
 block discarded – undo
11 11
 
12 12
 class Contact extends Model implements ContactContract
13 13
 {
14
-    use HasAddresses,SoftDeletes;
14
+    use HasAddresses, SoftDeletes;
15 15
 
16 16
     protected $guarded = ['id'];
17 17
 
Please login to merge, or discard this patch.