-
Notifications
You must be signed in to change notification settings - Fork 144
[CLEANUP] Avoid Hungarian notation for start(Position)
#977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think $offset
would be better throughout as a variable name.
src/Parsing/ParserState.php
Outdated
* @param int $length | ||
*/ | ||
private function substr($iStart, $length): string | ||
private function substr($start, $length): string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The equivalant PHP function has this parameter as $offset
, which I think is better.
src/Value/Value.php
Outdated
for ($iStartPosition = 0; $iStartPosition < $iStackLength; ++$iStartPosition) { | ||
if ($iStartPosition === ($iStackLength - 1) || $sDelimiter !== $aStack[$iStartPosition + 1]) { | ||
$aNewStack[] = $aStack[$iStartPosition]; | ||
for ($startPosition = 0; $startPosition < $iStackLength; ++$startPosition) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps $offset
would be a better name here too - particularly as it is changed during loop iteration to lose its original "start" meaning.
97996b5
to
ed47f1e
Compare
Part of #756