Permalink
Browse files

Use Null Coalesce Operator

  • Loading branch information...
carusogabriel committed Dec 17, 2017
1 parent 78a193c commit 0fa0251477bbcde53d5c0b5976da1b6dafd9fbb7
@@ -116,11 +116,7 @@ protected function doRead(int $offset, int $count): string
$result = '';
for ($i = 0; $i < $count; $i++) {
if (isset($this->content[$i + $offset])) {
$result .= $this->content[$i + $offset];
} else {
$result .= ' ';
}
$result .= $this->content[$i + $offset] ?? ' ';
}
return $result;
@@ -519,8 +519,8 @@ public function stream_metadata(string $path, int $option, $var): bool
}
$currentTime = time();
$content->lastModified(((isset($var[0])) ? ($var[0]) : ($currentTime)))
->lastAccessed(((isset($var[1])) ? ($var[1]) : ($currentTime)));
$content->lastModified($var[0] ?? $currentTime)
->lastAccessed($var[1] ?? $currentTime);
return true;
case STREAM_META_OWNER_NAME:

0 comments on commit 0fa0251

Please sign in to comment.