Skip to content

Commit

Permalink
Use ??= more
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolas-grekas committed Nov 2, 2022
1 parent b5fbe4f commit 438a69f
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,7 @@ private function doParse(string $value, int $flags)
$this->lines = explode("\n", $value);
$this->numberOfParsedLines = \count($this->lines);
$this->locallySkippedLineNumbers = [];

if (null === $this->totalNumberOfLines) {
$this->totalNumberOfLines = $this->numberOfParsedLines;
}
$this->totalNumberOfLines ??= $this->numberOfParsedLines;

if (!$this->moveToNextLine()) {
return null;
Expand Down

0 comments on commit 438a69f

Please sign in to comment.