@@ -479,7 +479,7 @@ public function minify(array $minify) : void {
479479 }
480480
481481 // use parent folders if it is shorter
482- if ($ minify ['urls ' ]['parent ' ] && $ dirs && \mb_strpos ($ attributes [$ key ], '/ ' ) === 0 && \mb_strpos ($ attributes [$ key ], '// ' ) === false ) {
482+ if ($ minify ['urls ' ]['parent ' ] && $ dirs && \mb_strpos ($ attributes [$ key ], '/ ' ) === 0 && ! \str_contains ($ attributes [$ key ], '// ' )) {
483483 $ isDir = \mb_strrpos ($ attributes [$ key ], '/ ' ) === \mb_strlen ($ attributes [$ key ])-1 ;
484484 $ compare = \explode ('/ ' , \trim ($ isDir ? $ attributes [$ key ] : \dirname ($ attributes [$ key ]), '/ ' ));
485485 $ update = false ;
@@ -531,7 +531,7 @@ public function minify(array $minify) : void {
531531 ), '; ' );
532532
533533 // trim classes
534- } elseif ($ key === 'class ' && $ min ['class ' ] && \mb_strpos ($ attributes [$ key ] ?? '' , ' ' ) !== false ) {
534+ } elseif ($ key === 'class ' && $ min ['class ' ] && \str_contains ($ attributes [$ key ] ?? '' , ' ' )) {
535535 $ attributes [$ key ] = \trim (\preg_replace ('/\s+/ ' , ' ' , $ attributes [$ key ]));
536536
537537 // minify option tag, always capture the tag to prevent it being removed as a default
@@ -879,7 +879,7 @@ public function html(array $options = []) : string {
879879 $ html .= '= ' .$ value ;
880880
881881 // single quotes || swap when minimal and there are double quotes in the string
882- } elseif ($ options ['quotestyle ' ] === 'single ' || ($ options ['quotestyle ' ] === 'minimal ' && \mb_strpos ($ value , '" ' ) !== false )) {
882+ } elseif ($ options ['quotestyle ' ] === 'single ' || ($ options ['quotestyle ' ] === 'minimal ' && \str_contains ($ value , '" ' ))) {
883883 $ html .= "=' " .\str_replace (['& ' , "' " , '< ' ], ['& ' , '' ' , '< ' ], $ value )."' " ;
884884
885885 // double quotes
0 commit comments