Skip to content

Commit bddfcbc

Browse files
committed
[UC-29] PHPstan and ECS fix
1 parent 4617766 commit bddfcbc

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/Updater/CustomerWithKeyUpdater.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,9 @@ public function updateWithUserKey(
8484
$payload,
8585
);
8686

87-
if (false === is_array($user) || false === array_key_exists('email', $user)) {
88-
throw new \RuntimeException('User was not created or updated.');
87+
if (!is_array($user) || !isset($user['email']) || !is_string($user['email'])) {
88+
throw new \RuntimeException('User was not created or updated (missing email).');
8989
}
90-
9190
$this->sendEvent($apiAwareResource, $user['email'], $eventName, $payload);
9291

9392
return $user;

0 commit comments

Comments
 (0)