Skip to content

Commit

Permalink
Fix PhpStan errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
janbarasek committed Jan 9, 2022
1 parent d214759 commit f48d2a1
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Entity/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,12 @@ public function setEmail(string $email): void
}


/**
* @return non-empty-string
*/
public function getEmailOrPhone(): string
{
$return = $this->getPhone() ?? $this->getEmail();
assert($return === '', sprintf('Contact for customer "%d" does not exist.', $this->getId()));

return $return;
return $this->getPhone() ?? $this->getEmail();
}


Expand Down

0 comments on commit f48d2a1

Please # to comment.