@@ -58,7 +58,7 @@ public function __construct($text, Settings $parserSettings, $lineNumber = 1)
5858 $ this ->parserSettings = $ parserSettings ;
5959 $ this ->text = $ text ;
6060 $ this ->lineNumber = $ lineNumber ;
61- $ this ->setCharset ($ this ->parserSettings ->defaultCharset );
61+ $ this ->setCharset ($ this ->parserSettings ->getDefaultCharset () );
6262 }
6363
6464 /**
@@ -151,7 +151,7 @@ public function parseCharacter($isForIdentifier)
151151 {
152152 if ($ this ->peek () === '\\' ) {
153153 if (
154- $ isForIdentifier && $ this ->parserSettings ->lenientParsing
154+ $ isForIdentifier && $ this ->parserSettings ->usesLenientParsing ()
155155 && ($ this ->comes ('\\0 ' ) || $ this ->comes ('\\9 ' ))
156156 ) {
157157 // Non-strings can contain \0 or \9 which is an IE hack supported in lenient parsing.
@@ -215,7 +215,7 @@ public function consumeWhiteSpace(): array
215215 while (\preg_match ('/ \\s/isSu ' , $ this ->peek ()) === 1 ) {
216216 $ this ->consume (1 );
217217 }
218- if ($ this ->parserSettings ->lenientParsing ) {
218+ if ($ this ->parserSettings ->usesLenientParsing () ) {
219219 try {
220220 $ comment = $ this ->consumeComment ();
221221 } catch (UnexpectedEOFException $ e ) {
@@ -416,7 +416,7 @@ public function backtrack($numberOfCharacters): void
416416 */
417417 public function strlen ($ string ): int
418418 {
419- if ($ this ->parserSettings ->multibyteSupport ) {
419+ if ($ this ->parserSettings ->hasMultibyteSupport () ) {
420420 return \mb_strlen ($ string , $ this ->charset );
421421 } else {
422422 return \strlen ($ string );
@@ -449,7 +449,7 @@ private function substr($offset, $length): string
449449 */
450450 private function strtolower ($ string ): string
451451 {
452- if ($ this ->parserSettings ->multibyteSupport ) {
452+ if ($ this ->parserSettings ->hasMultibyteSupport () ) {
453453 return \mb_strtolower ($ string , $ this ->charset );
454454 } else {
455455 return \strtolower ($ string );
@@ -465,7 +465,7 @@ private function strtolower($string): string
465465 */
466466 private function strsplit ($ string )
467467 {
468- if ($ this ->parserSettings ->multibyteSupport ) {
468+ if ($ this ->parserSettings ->hasMultibyteSupport () ) {
469469 if ($ this ->streql ($ this ->charset , 'utf-8 ' )) {
470470 $ result = \preg_split ('//u ' , $ string , -1 , PREG_SPLIT_NO_EMPTY );
471471 if (!\is_array ($ result )) {
@@ -498,7 +498,7 @@ private function strsplit($string)
498498 */
499499 private function strpos ($ haystack , $ needle , $ offset )
500500 {
501- if ($ this ->parserSettings ->multibyteSupport ) {
501+ if ($ this ->parserSettings ->hasMultibyteSupport () ) {
502502 return \mb_strpos ($ haystack , $ needle , $ offset , $ this ->charset );
503503 } else {
504504 return \strpos ($ haystack , $ needle , $ offset );
0 commit comments