From 3ec60e5ef301ef9db442c757afdb03cf3eb04597 Mon Sep 17 00:00:00 2001 From: Thomas Carney Date: Fri, 28 Feb 2020 12:43:58 +0000 Subject: [PATCH] Remove return type declaration (#61) --- src/Customer.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Customer.php b/src/Customer.php index 062bb5b..56f2e6e 100644 --- a/src/Customer.php +++ b/src/Customer.php @@ -101,7 +101,7 @@ public function customAttributes() * @param string $externalId * @return Customer|null */ - public static function findByExternalId($externalId): ?Customer + public static function findByExternalId($externalId) { if (gettype($externalId) == 'string') { $externalId = ['external_id' => $externalId]; @@ -113,7 +113,7 @@ public static function findByExternalId($externalId): ?Customer return null; } - return $response->first(); + return $response->first() || null; } /**