Skip to content

Commit

Permalink
null coalescing operator
Browse files Browse the repository at this point in the history
  • Loading branch information
jrushlow committed Feb 20, 2024
1 parent 50caba1 commit 64b2c1e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Util/YamlSourceManipulator.php
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ private function findEndPositionOfValue($value, $offset = null)
}

if (\is_scalar($value) || null === $value) {
$offset = null === $offset ? $this->currentPosition : $offset;
$offset ??= $this->currentPosition;

if (\is_bool($value)) {
// (?i) & (?-i) opens/closes case insensitive match
Expand Down Expand Up @@ -1174,7 +1174,7 @@ private function manuallyIncrementIndentation()
private function isEOF(?int $position = null)
{
$position = null === $position ? $this->currentPosition : $position;
$position ??= $this->currentPosition;
return $position === \strlen($this->contents);
}
Expand Down

0 comments on commit 64b2c1e

Please sign in to comment.