Skip to content

Commit

Permalink
Return annotation fix & return type (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
muratsac authored and pkopac committed Nov 4, 2019
1 parent 0182b72 commit af722d5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Customer.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,9 @@ public function customAttributes()
/**
* Find a Customer by External ID. Returns only first result!
* @param string $externalId
* @return Customer
* @return Customer|null
*/
public static function findByExternalId($externalId)
public static function findByExternalId($externalId): ?Customer
{
if (gettype($externalId) == 'string') {
$externalId = ['external_id' => $externalId];
Expand All @@ -111,9 +111,9 @@ public static function findByExternalId($externalId)

if (is_null($response)) {
return null;
} else {
return $response->first();
}

return $response->first();
}

/**
Expand Down

0 comments on commit af722d5

Please sign in to comment.