Skip to content

Commit

Permalink
Merge pull request #1956 from carusogabriel/chore/use-coalesce-operator
Browse files Browse the repository at this point in the history
Use Null Coalesce Operator
  • Loading branch information
lonnieezell authored Apr 20, 2019
2 parents 6973c65 + 319b60b commit 2db456a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions system/HTTP/CLIRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,7 @@ public function getSegments(): array
*/
public function getOption(string $key)
{
if (array_key_exists($key, $this->options))
{
return $this->options[$key];
}

return null;
return $this->options[$key] ?? null;
}

//--------------------------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion system/Images/Handlers/BaseHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ public function getEXIF(string $key = null, bool $silent = false)
$exif = exif_read_data($this->image->getPathname());
if (! is_null($key) && is_array($exif))
{
$exif = array_key_exists($key, $exif) ? $exif[$key] : false;
$exif = $exif[$key] ?? false;
}

return $exif;
Expand Down

0 comments on commit 2db456a

Please sign in to comment.