Skip to content

Commit 3e9bc30

Browse files
authored
[CLEANUP] Avoid Hungarian notation for position (#935)
Part of #756
1 parent 9682877 commit 3e9bc30

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

src/Parsing/Anchor.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,24 @@ class Anchor
1212
/**
1313
* @var int
1414
*/
15-
private $iPosition;
15+
private $position;
1616

1717
/**
1818
* @var ParserState
1919
*/
2020
private $parserState;
2121

2222
/**
23-
* @param int $iPosition
23+
* @param int $position
2424
*/
25-
public function __construct($iPosition, ParserState $parserState)
25+
public function __construct($position, ParserState $parserState)
2626
{
27-
$this->iPosition = $iPosition;
27+
$this->position = $position;
2828
$this->parserState = $parserState;
2929
}
3030

3131
public function backtrack(): void
3232
{
33-
$this->parserState->setPosition($this->iPosition);
33+
$this->parserState->setPosition($this->position);
3434
}
3535
}

src/Parsing/ParserState.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,11 @@ public function anchor(): Anchor
122122
}
123123

124124
/**
125-
* @param int $iPosition
125+
* @param int $position
126126
*/
127-
public function setPosition($iPosition): void
127+
public function setPosition($position): void
128128
{
129-
$this->iCurrentPosition = $iPosition;
129+
$this->iCurrentPosition = $position;
130130
}
131131

132132
/**

src/RuleSet/RuleSet.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,12 @@ public function addRule(Rule $rule, ?Rule $oSibling = null): void
108108
$this->aRules[$sRule] = [];
109109
}
110110

111-
$iPosition = \count($this->aRules[$sRule]);
111+
$position = \count($this->aRules[$sRule]);
112112

113113
if ($oSibling !== null) {
114114
$iSiblingPos = \array_search($oSibling, $this->aRules[$sRule], true);
115115
if ($iSiblingPos !== false) {
116-
$iPosition = $iSiblingPos;
116+
$position = $iSiblingPos;
117117
$rule->setPosition($oSibling->getLineNo(), $oSibling->getColNo() - 1);
118118
}
119119
}
@@ -127,7 +127,7 @@ public function addRule(Rule $rule, ?Rule $oSibling = null): void
127127
}
128128
}
129129

130-
\array_splice($this->aRules[$sRule], $iPosition, 0, [$rule]);
130+
\array_splice($this->aRules[$sRule], $position, 0, [$rule]);
131131
}
132132

133133
/**

0 commit comments

Comments
 (0)