Skip to content

Commit 1a385cd

Browse files
authored
[CLEANUP] Avoid Hungarian notation for text/characters (#940)
1 parent 8c770fb commit 1a385cd

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/Parser.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ class Parser
1919
private $parserState;
2020

2121
/**
22-
* @param string $sText the complete CSS as text (i.e., usually the contents of a CSS file)
22+
* @param string $text the complete CSS as text (i.e., usually the contents of a CSS file)
2323
* @param int<0, max> $lineNumber the line number (starting from 1, not from 0)
2424
*/
25-
public function __construct($sText, ?Settings $parserSettings = null, $lineNumber = 1)
25+
public function __construct($text, ?Settings $parserSettings = null, $lineNumber = 1)
2626
{
2727
if ($parserSettings === null) {
2828
$parserSettings = Settings::create();
2929
}
30-
$this->parserState = new ParserState($sText, $parserSettings, $lineNumber);
30+
$this->parserState = new ParserState($text, $parserSettings, $lineNumber);
3131
}
3232

3333
/**

src/Parsing/ParserState.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ class ParserState
2727
/**
2828
* @var string
2929
*/
30-
private $sText;
30+
private $text;
3131

3232
/**
3333
* @var array<int, string>
3434
*/
35-
private $aText;
35+
private $characters;
3636

3737
/**
3838
* @var int
@@ -57,13 +57,13 @@ class ParserState
5757
private $lineNumber;
5858

5959
/**
60-
* @param string $sText the complete CSS as text (i.e., usually the contents of a CSS file)
60+
* @param string $text the complete CSS as text (i.e., usually the contents of a CSS file)
6161
* @param int<0, max> $lineNumber
6262
*/
63-
public function __construct($sText, Settings $parserSettings, $lineNumber = 1)
63+
public function __construct($text, Settings $parserSettings, $lineNumber = 1)
6464
{
6565
$this->parserSettings = $parserSettings;
66-
$this->sText = $sText;
66+
$this->text = $text;
6767
$this->lineNumber = $lineNumber;
6868
$this->setCharset($this->parserSettings->sDefaultCharset);
6969
}
@@ -76,9 +76,9 @@ public function __construct($sText, Settings $parserSettings, $lineNumber = 1)
7676
public function setCharset($sCharset): void
7777
{
7878
$this->sCharset = $sCharset;
79-
$this->aText = $this->strsplit($this->sText);
80-
if (\is_array($this->aText)) {
81-
$this->iLength = \count($this->aText);
79+
$this->characters = $this->strsplit($this->text);
80+
if (\is_array($this->characters)) {
81+
$this->iLength = \count($this->characters);
8282
}
8383
}
8484

@@ -451,7 +451,7 @@ private function substr($iStart, $iLength): string
451451
}
452452
$result = '';
453453
while ($iLength > 0) {
454-
$result .= $this->aText[$iStart];
454+
$result .= $this->characters[$iStart];
455455
$iStart++;
456456
$iLength--;
457457
}

0 commit comments

Comments
 (0)