Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/Parsing/ParserState.php
Original file line number Diff line number Diff line change
Expand Up @@ -404,11 +404,11 @@ public function streql($string1, $string2, $caseInsensitive = true): bool
}

/**
* @param int $iAmount
* @param int $numberOfCharacters
*/
public function backtrack($iAmount): void
public function backtrack($numberOfCharacters): void
{
$this->currentPosition -= $iAmount;
$this->currentPosition -= $numberOfCharacters;
}

/**
Expand Down Expand Up @@ -490,18 +490,18 @@ private function strsplit($string)
}

/**
* @param string $string
* @param string $sNeedle
* @param string $haystack
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good rename to match the PHP docs.

* @param string $needle
* @param int $offset
*
* @return int|false
*/
private function strpos($string, $sNeedle, $offset)
private function strpos($haystack, $needle, $offset)
{
if ($this->parserSettings->bMultibyteSupport) {
return \mb_strpos($string, $sNeedle, $offset, $this->charset);
return \mb_strpos($haystack, $needle, $offset, $this->charset);
} else {
return \strpos($string, $sNeedle, $offset);
return \strpos($haystack, $needle, $offset);
}
}
}