@@ -60,14 +60,14 @@ public static function parse(ParserState $oParserState, $oList = null)
6060 do {
6161 $ aSelectorParts [] = $ oParserState ->consume (1 )
6262 . $ oParserState ->consumeUntil (['{ ' , '} ' , '\'' , '" ' ], false , false , $ aComments );
63- if (in_array ($ oParserState ->peek (), ['\'' , '" ' ]) && substr (end ($ aSelectorParts ), -1 ) != "\\" ) {
63+ if (in_array ($ oParserState ->peek (), ['\'' , '" ' ], true ) && substr (end ($ aSelectorParts ), -1 ) != "\\" ) {
6464 if ($ sStringWrapperChar === false ) {
6565 $ sStringWrapperChar = $ oParserState ->peek ();
6666 } elseif ($ sStringWrapperChar == $ oParserState ->peek ()) {
6767 $ sStringWrapperChar = false ;
6868 }
6969 }
70- } while (!in_array ($ oParserState ->peek (), ['{ ' , '} ' ]) || $ sStringWrapperChar !== false );
70+ } while (!in_array ($ oParserState ->peek (), ['{ ' , '} ' ], true ) || $ sStringWrapperChar !== false );
7171 $ oResult ->setSelectors (implode ('' , $ aSelectorParts ), $ oList );
7272 if ($ oParserState ->comes ('{ ' )) {
7373 $ oParserState ->consume (1 );
@@ -229,7 +229,7 @@ public function expandBorderShorthand(): void
229229 } elseif ($ mValue instanceof Color) {
230230 $ sNewRuleName = $ sBorderRule . "-color " ;
231231 } else {
232- if (in_array ($ mValue , $ aBorderSizes )) {
232+ if (in_array ($ mValue , $ aBorderSizes, true )) {
233233 $ sNewRuleName = $ sBorderRule . "-width " ;
234234 } else {
235235 $ sNewRuleName = $ sBorderRule . "-style " ;
@@ -338,20 +338,19 @@ public function expandFontShorthand(): void
338338 if (!$ mValue instanceof Value) {
339339 $ mValue = mb_strtolower ($ mValue );
340340 }
341- if (in_array ($ mValue , ['normal ' , 'inherit ' ])) {
341+ if (in_array ($ mValue , ['normal ' , 'inherit ' ], true )) {
342342 foreach (['font-style ' , 'font-weight ' , 'font-variant ' ] as $ sProperty ) {
343343 if (!isset ($ aFontProperties [$ sProperty ])) {
344344 $ aFontProperties [$ sProperty ] = $ mValue ;
345345 }
346346 }
347- } elseif (in_array ($ mValue , ['italic ' , 'oblique ' ])) {
347+ } elseif (in_array ($ mValue , ['italic ' , 'oblique ' ], true )) {
348348 $ aFontProperties ['font-style ' ] = $ mValue ;
349349 } elseif ($ mValue == 'small-caps ' ) {
350350 $ aFontProperties ['font-variant ' ] = $ mValue ;
351351 } elseif (
352- in_array ($ mValue , ['bold ' , 'bolder ' , 'lighter ' ])
353- || ($ mValue instanceof Size
354- && in_array ($ mValue ->getSize (), range (100 , 900 , 100 )))
352+ in_array ($ mValue , ['bold ' , 'bolder ' , 'lighter ' ], true )
353+ || ($ mValue instanceof Size && in_array ($ mValue ->getSize (), range (100.0 , 900.0 , 100.0 ), true ))
355354 ) {
356355 $ aFontProperties ['font-weight ' ] = $ mValue ;
357356 } elseif ($ mValue instanceof RuleValueList && $ mValue ->getListSeparator () == '/ ' ) {
@@ -425,12 +424,12 @@ public function expandBackgroundShorthand(): void
425424 $ aBgProperties ['background-image ' ] = $ mValue ;
426425 } elseif ($ mValue instanceof Color) {
427426 $ aBgProperties ['background-color ' ] = $ mValue ;
428- } elseif (in_array ($ mValue , ['scroll ' , 'fixed ' ])) {
427+ } elseif (in_array ($ mValue , ['scroll ' , 'fixed ' ], true )) {
429428 $ aBgProperties ['background-attachment ' ] = $ mValue ;
430- } elseif (in_array ($ mValue , ['repeat ' , 'no-repeat ' , 'repeat-x ' , 'repeat-y ' ])) {
429+ } elseif (in_array ($ mValue , ['repeat ' , 'no-repeat ' , 'repeat-x ' , 'repeat-y ' ], true )) {
431430 $ aBgProperties ['background-repeat ' ] = $ mValue ;
432431 } elseif (
433- in_array ($ mValue , ['left ' , 'center ' , 'right ' , 'top ' , 'bottom ' ])
432+ in_array ($ mValue , ['left ' , 'center ' , 'right ' , 'top ' , 'bottom ' ], true )
434433 || $ mValue instanceof Size
435434 ) {
436435 if ($ iNumBgPos == 0 ) {
@@ -516,9 +515,9 @@ public function expandListStyleShorthand(): void
516515 }
517516 if ($ mValue instanceof Url) {
518517 $ aListProperties ['list-style-image ' ] = $ mValue ;
519- } elseif (in_array ($ mValue , $ aListStyleTypes )) {
518+ } elseif (in_array ($ mValue , $ aListStyleTypes, true )) {
520519 $ aListProperties ['list-style-types ' ] = $ mValue ;
521- } elseif (in_array ($ mValue , $ aListStylePositions )) {
520+ } elseif (in_array ($ mValue , $ aListStylePositions, true )) {
522521 $ aListProperties ['list-style-position ' ] = $ mValue ;
523522 }
524523 }
0 commit comments