Skip to content

Commit 4edbbca

Browse files
authored
[CLEANUP] Avoid Hungarian notation for *delimiter* (#1067)
Part of #756
1 parent 08d30eb commit 4edbbca

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/Value/Value.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct($lineNumber = 0)
3232
}
3333

3434
/**
35-
* @param array<array-key, string> $aListDelimiters
35+
* @param array<array-key, string> $listDelimiters
3636
*
3737
* @return Value|string
3838
*
@@ -41,7 +41,7 @@ public function __construct($lineNumber = 0)
4141
*
4242
* @internal since V8.8.0
4343
*/
44-
public static function parseValue(ParserState $parserState, array $aListDelimiters = [])
44+
public static function parseValue(ParserState $parserState, array $listDelimiters = [])
4545
{
4646
/** @var array<int, Value|string> $stack */
4747
$stack = [];
@@ -53,16 +53,16 @@ public static function parseValue(ParserState $parserState, array $aListDelimite
5353
|| $parserState->isEnd())
5454
) {
5555
if (\count($stack) > 0) {
56-
$bFoundDelimiter = false;
57-
foreach ($aListDelimiters as $sDelimiter) {
58-
if ($parserState->comes($sDelimiter)) {
59-
\array_push($stack, $parserState->consume($sDelimiter));
56+
$foundDelimiter = false;
57+
foreach ($listDelimiters as $delimiter) {
58+
if ($parserState->comes($delimiter)) {
59+
\array_push($stack, $parserState->consume($delimiter));
6060
$parserState->consumeWhiteSpace();
61-
$bFoundDelimiter = true;
61+
$foundDelimiter = true;
6262
break;
6363
}
6464
}
65-
if (!$bFoundDelimiter) {
65+
if (!$foundDelimiter) {
6666
//Whitespace was the list delimiter
6767
\array_push($stack, ' ');
6868
}
@@ -71,24 +71,24 @@ public static function parseValue(ParserState $parserState, array $aListDelimite
7171
$parserState->consumeWhiteSpace();
7272
}
7373
// Convert the list to list objects
74-
foreach ($aListDelimiters as $sDelimiter) {
74+
foreach ($listDelimiters as $delimiter) {
7575
$stackSize = \count($stack);
7676
if ($stackSize === 1) {
7777
return $stack[0];
7878
}
7979
$newStack = [];
8080
for ($offset = 0; $offset < $stackSize; ++$offset) {
81-
if ($offset === ($stackSize - 1) || $sDelimiter !== $stack[$offset + 1]) {
81+
if ($offset === ($stackSize - 1) || $delimiter !== $stack[$offset + 1]) {
8282
$newStack[] = $stack[$offset];
8383
continue;
8484
}
8585
$length = 2; //Number of elements to be joined
8686
for ($i = $offset + 3; $i < $stackSize; $i += 2, ++$length) {
87-
if ($sDelimiter !== $stack[$i]) {
87+
if ($delimiter !== $stack[$i]) {
8888
break;
8989
}
9090
}
91-
$list = new RuleValueList($sDelimiter, $parserState->currentLine());
91+
$list = new RuleValueList($delimiter, $parserState->currentLine());
9292
for ($i = $offset; $i - $offset < $length * 2; $i += 2) {
9393
$list->addListComponent($stack[$i]);
9494
}

0 commit comments

Comments
 (0)