Skip to content

Commit

Permalink
use null coalescence operator
Browse files Browse the repository at this point in the history
  • Loading branch information
Josh-G committed Apr 3, 2020
1 parent b1c7024 commit 0e43c0c
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/Models/CompanySearchResult.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +90,11 @@ public function __construct($client, array $companyDetails)
$this->name = $companyDetails['name'] ?? null;
$this->address = $companyDetails['address'] ?? null;
$this->status = $companyDetails['status'] ?? null;
$this->type = isset($companyDetails['type']) ? $companyDetails['type'] : null;
$this->officeType = isset($companyDetails['officeType']) ? $companyDetails['officeType'] : null;
$this->vatNo = isset($companyDetails['vatNo']) ? $companyDetails['vatNo'] : [];
$this->tradingNames = isset($companyDetails['tradingNames']) ? $companyDetails['tradingNames'] : [];
$this->dateOfLatestChange = isset($companyDetails['dateOfLatestChange']) ?
$companyDetails['dateOfLatestChange'] : null;
$this->type = $companyDetails['type'] ?? null;
$this->officeType = $companyDetails['officeType'] ?? null;
$this->vatNo = $companyDetails['vatNo'] ?? [];
$this->tradingNames = $companyDetails['tradingNames'] ?? [];
$this->dateOfLatestChange = $companyDetails['dateOfLatestChange'] ?? null;
}

/**
Expand Down

0 comments on commit 0e43c0c

Please sign in to comment.