@@ -150,7 +150,7 @@ public function dumpScalar(Cursor $cursor, string $type, $value)
150150 case is_nan ($ value ): $ value = 'NAN ' ; break ;
151151 default :
152152 $ value = (string ) $ value ;
153- if (false === strpos ($ value , $ this ->decimalPoint )) {
153+ if (! str_contains ($ value , $ this ->decimalPoint )) {
154154 $ value .= $ this ->decimalPoint .'0 ' ;
155155 }
156156 break ;
@@ -441,7 +441,7 @@ protected function style(string $style, string $value, array $attr = [])
441441
442442 if (isset ($ attr ['ellipsis ' ], $ attr ['ellipsis-type ' ])) {
443443 $ prefix = substr ($ value , 0 , -$ attr ['ellipsis ' ]);
444- if ('cli ' === \PHP_SAPI && 'path ' === $ attr ['ellipsis-type ' ] && isset ($ _SERVER [$ pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD ' : 'PWD ' ]) && 0 === strpos ($ prefix , $ _SERVER [$ pwd ])) {
444+ if ('cli ' === \PHP_SAPI && 'path ' === $ attr ['ellipsis-type ' ] && isset ($ _SERVER [$ pwd = '\\' === \DIRECTORY_SEPARATOR ? 'CD ' : 'PWD ' ]) && str_starts_with ($ prefix , $ _SERVER [$ pwd ])) {
445445 $ prefix = '. ' .substr ($ prefix , \strlen ($ _SERVER [$ pwd ]));
446446 }
447447 if (!empty ($ attr ['ellipsis-tail ' ])) {
@@ -475,7 +475,7 @@ protected function style(string $style, string $value, array $attr = [])
475475 } else {
476476 $ value = "\033[ {$ this ->styles [$ style ]}m " .$ value ;
477477 }
478- if ($ cchrCount && $ endCchr === substr ($ value , - \strlen ( $ endCchr) )) {
478+ if ($ cchrCount && str_ends_with ($ value , $ endCchr )) {
479479 $ value = substr ($ value , 0 , -\strlen ($ endCchr ));
480480 } else {
481481 $ value .= "\033[ {$ this ->styles ['default ' ]}m " ;
0 commit comments