@@ -44,7 +44,7 @@ class ParserState
44
44
*
45
45
* @var string
46
46
*/
47
- private $ sCharset ;
47
+ private $ charset ;
48
48
49
49
/**
50
50
* @var int
@@ -71,11 +71,11 @@ public function __construct($text, Settings $parserSettings, $lineNumber = 1)
71
71
/**
72
72
* Sets the charset to be used if the CSS does not contain an `@charset` declaration.
73
73
*
74
- * @param string $sCharset
74
+ * @param string $charset
75
75
*/
76
- public function setCharset ($ sCharset ): void
76
+ public function setCharset ($ charset ): void
77
77
{
78
- $ this ->sCharset = $ sCharset ;
78
+ $ this ->charset = $ charset ;
79
79
$ this ->characters = $ this ->strsplit ($ this ->text );
80
80
if (\is_array ($ this ->characters )) {
81
81
$ this ->iLength = \count ($ this ->characters );
@@ -195,7 +195,7 @@ public function parseCharacter($bIsForIdentifier)
195
195
$ sUtf32 .= \chr ($ iUnicode & 0xff );
196
196
$ iUnicode = $ iUnicode >> 8 ;
197
197
}
198
- return \iconv ('utf-32le ' , $ this ->sCharset , $ sUtf32 );
198
+ return \iconv ('utf-32le ' , $ this ->charset , $ sUtf32 );
199
199
}
200
200
if ($ bIsForIdentifier ) {
201
201
$ peek = \ord ($ this ->peek ());
@@ -431,7 +431,7 @@ public function backtrack($iAmount): void
431
431
public function strlen ($ sString ): int
432
432
{
433
433
if ($ this ->parserSettings ->bMultibyteSupport ) {
434
- return \mb_strlen ($ sString , $ this ->sCharset );
434
+ return \mb_strlen ($ sString , $ this ->charset );
435
435
} else {
436
436
return \strlen ($ sString );
437
437
}
@@ -464,7 +464,7 @@ private function substr($iStart, $iLength): string
464
464
private function strtolower ($ sString ): string
465
465
{
466
466
if ($ this ->parserSettings ->bMultibyteSupport ) {
467
- return \mb_strtolower ($ sString , $ this ->sCharset );
467
+ return \mb_strtolower ($ sString , $ this ->charset );
468
468
} else {
469
469
return \strtolower ($ sString );
470
470
}
@@ -478,13 +478,13 @@ private function strtolower($sString): string
478
478
private function strsplit ($ sString )
479
479
{
480
480
if ($ this ->parserSettings ->bMultibyteSupport ) {
481
- if ($ this ->streql ($ this ->sCharset , 'utf-8 ' )) {
481
+ if ($ this ->streql ($ this ->charset , 'utf-8 ' )) {
482
482
return \preg_split ('//u ' , $ sString , -1 , PREG_SPLIT_NO_EMPTY );
483
483
} else {
484
- $ iLength = \mb_strlen ($ sString , $ this ->sCharset );
484
+ $ iLength = \mb_strlen ($ sString , $ this ->charset );
485
485
$ result = [];
486
486
for ($ i = 0 ; $ i < $ iLength ; ++$ i ) {
487
- $ result [] = \mb_substr ($ sString , $ i , 1 , $ this ->sCharset );
487
+ $ result [] = \mb_substr ($ sString , $ i , 1 , $ this ->charset );
488
488
}
489
489
return $ result ;
490
490
}
@@ -507,7 +507,7 @@ private function strsplit($sString)
507
507
private function strpos ($ sString , $ sNeedle , $ iOffset )
508
508
{
509
509
if ($ this ->parserSettings ->bMultibyteSupport ) {
510
- return \mb_strpos ($ sString , $ sNeedle , $ iOffset , $ this ->sCharset );
510
+ return \mb_strpos ($ sString , $ sNeedle , $ iOffset , $ this ->charset );
511
511
} else {
512
512
return \strpos ($ sString , $ sNeedle , $ iOffset );
513
513
}
0 commit comments