diff --git a/app/Services/Contact/Contact/CreateContact.php b/app/Services/Contact/Contact/CreateContact.php index 3d3c9d4bf69..5047d7481c5 100644 --- a/app/Services/Contact/Contact/CreateContact.php +++ b/app/Services/Contact/Contact/CreateContact.php @@ -183,14 +183,12 @@ private function updateEmail(array $data, Contact $contact) return; } - $contactField = app(CreateContactField::class)->execute( - [ - 'account_id' => $data['account_id'], - 'contact_id' => $contact->id, - 'contact_field_type_id' => $contactFieldType->id, - 'data' => $data['email'], - ] - ); + $contactField = app(CreateContactField::class)->execute([ + 'account_id' => $data['account_id'], + 'contact_id' => $contact->id, + 'contact_field_type_id' => $contactFieldType->id, + 'data' => $data['email'], + ]); } /** diff --git a/tests/Unit/Services/Contact/Contact/CreateContactTest.php b/tests/Unit/Services/Contact/Contact/CreateContactTest.php index 4a7faba2700..8f0702440b0 100644 --- a/tests/Unit/Services/Contact/Contact/CreateContactTest.php +++ b/tests/Unit/Services/Contact/Contact/CreateContactTest.php @@ -100,7 +100,7 @@ public function it_stores_a_contact_with_email() $this->assertDatabaseHas('contact_fields', [ 'account_id' => $account->id, 'contact_id' => $contact->id, - 'data' => 'email@example', + 'data' => 'email@example.com', ]); }