Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Alexis Saettler <alexis@saettler.org>
  • Loading branch information
iloveitaly and asbiin authored May 17, 2021
1 parent 748a862 commit 95bcc17
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 6 additions & 8 deletions app/Services/Contact/Contact/CreateContact.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
]);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Services/Contact/Contact/CreateContactTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
]);
}

Expand Down

0 comments on commit 95bcc17

Please sign in to comment.