diff --git a/src/Parser.php b/src/Parser.php index 7f3a9229..eae809a5 100644 --- a/src/Parser.php +++ b/src/Parser.php @@ -19,15 +19,15 @@ class Parser private $parserState; /** - * @param string $sText the complete CSS as text (i.e., usually the contents of a CSS file) + * @param string $text the complete CSS as text (i.e., usually the contents of a CSS file) * @param int<0, max> $lineNumber the line number (starting from 1, not from 0) */ - public function __construct($sText, ?Settings $parserSettings = null, $lineNumber = 1) + public function __construct($text, ?Settings $parserSettings = null, $lineNumber = 1) { if ($parserSettings === null) { $parserSettings = Settings::create(); } - $this->parserState = new ParserState($sText, $parserSettings, $lineNumber); + $this->parserState = new ParserState($text, $parserSettings, $lineNumber); } /** diff --git a/src/Parsing/ParserState.php b/src/Parsing/ParserState.php index 9ffd65e0..261c3995 100644 --- a/src/Parsing/ParserState.php +++ b/src/Parsing/ParserState.php @@ -27,12 +27,12 @@ class ParserState /** * @var string */ - private $sText; + private $text; /** * @var array */ - private $aText; + private $characters; /** * @var int @@ -57,13 +57,13 @@ class ParserState private $lineNumber; /** - * @param string $sText the complete CSS as text (i.e., usually the contents of a CSS file) + * @param string $text the complete CSS as text (i.e., usually the contents of a CSS file) * @param int<0, max> $lineNumber */ - public function __construct($sText, Settings $parserSettings, $lineNumber = 1) + public function __construct($text, Settings $parserSettings, $lineNumber = 1) { $this->parserSettings = $parserSettings; - $this->sText = $sText; + $this->text = $text; $this->lineNumber = $lineNumber; $this->setCharset($this->parserSettings->sDefaultCharset); } @@ -76,9 +76,9 @@ public function __construct($sText, Settings $parserSettings, $lineNumber = 1) public function setCharset($sCharset): void { $this->sCharset = $sCharset; - $this->aText = $this->strsplit($this->sText); - if (\is_array($this->aText)) { - $this->iLength = \count($this->aText); + $this->characters = $this->strsplit($this->text); + if (\is_array($this->characters)) { + $this->iLength = \count($this->characters); } } @@ -451,7 +451,7 @@ private function substr($iStart, $iLength): string } $result = ''; while ($iLength > 0) { - $result .= $this->aText[$iStart]; + $result .= $this->characters[$iStart]; $iStart++; $iLength--; }