diff --git a/src/Util/YamlSourceManipulator.php b/src/Util/YamlSourceManipulator.php index 4e2807c6d..0728a5145 100644 --- a/src/Util/YamlSourceManipulator.php +++ b/src/Util/YamlSourceManipulator.php @@ -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 @@ -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); }