3131 */
3232abstract class AbstractString implements \JsonSerializable
3333{
34- public const PREG_PATTERN_ORDER = \ PREG_PATTERN_ORDER ;
35- public const PREG_SET_ORDER = \ PREG_SET_ORDER ;
36- public const PREG_OFFSET_CAPTURE = \ PREG_OFFSET_CAPTURE ;
37- public const PREG_UNMATCHED_AS_NULL = \ PREG_UNMATCHED_AS_NULL ;
34+ public const PREG_PATTERN_ORDER = PREG_PATTERN_ORDER ;
35+ public const PREG_SET_ORDER = PREG_SET_ORDER ;
36+ public const PREG_OFFSET_CAPTURE = PREG_OFFSET_CAPTURE ;
37+ public const PREG_UNMATCHED_AS_NULL = PREG_UNMATCHED_AS_NULL ;
3838
3939 public const PREG_SPLIT = 0 ;
40- public const PREG_SPLIT_NO_EMPTY = \ PREG_SPLIT_NO_EMPTY ;
41- public const PREG_SPLIT_DELIM_CAPTURE = \ PREG_SPLIT_DELIM_CAPTURE ;
42- public const PREG_SPLIT_OFFSET_CAPTURE = \ PREG_SPLIT_OFFSET_CAPTURE ;
40+ public const PREG_SPLIT_NO_EMPTY = PREG_SPLIT_NO_EMPTY ;
41+ public const PREG_SPLIT_DELIM_CAPTURE = PREG_SPLIT_DELIM_CAPTURE ;
42+ public const PREG_SPLIT_OFFSET_CAPTURE = PREG_SPLIT_OFFSET_CAPTURE ;
4343
4444 protected $ string = '' ;
4545 protected $ ignoreCase = false ;
@@ -262,7 +262,7 @@ public function collapseWhitespace(): self
262262 public function endsWith ($ suffix ): bool
263263 {
264264 if (!\is_array ($ suffix ) && !$ suffix instanceof \Traversable) {
265- throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , \get_class ( $ this ) ));
265+ throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , static ::class ));
266266 }
267267
268268 foreach ($ suffix as $ s ) {
@@ -317,7 +317,7 @@ public function ensureStart(string $prefix): self
317317 public function equalsTo ($ string ): bool
318318 {
319319 if (!\is_array ($ string ) && !$ string instanceof \Traversable) {
320- throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , \get_class ( $ this ) ));
320+ throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , static ::class ));
321321 }
322322
323323 foreach ($ string as $ s ) {
@@ -351,7 +351,7 @@ public function ignoreCase(): self
351351 public function indexOf ($ needle , int $ offset = 0 ): ?int
352352 {
353353 if (!\is_array ($ needle ) && !$ needle instanceof \Traversable) {
354- throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , \get_class ( $ this ) ));
354+ throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , static ::class ));
355355 }
356356
357357 $ i = \PHP_INT_MAX ;
@@ -373,7 +373,7 @@ public function indexOf($needle, int $offset = 0): ?int
373373 public function indexOfLast ($ needle , int $ offset = 0 ): ?int
374374 {
375375 if (!\is_array ($ needle ) && !$ needle instanceof \Traversable) {
376- throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , \get_class ( $ this ) ));
376+ throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , static ::class ));
377377 }
378378
379379 $ i = null ;
@@ -536,7 +536,7 @@ public function split(string $delimiter, int $limit = null, int $flags = null):
536536 public function startsWith ($ prefix ): bool
537537 {
538538 if (!\is_array ($ prefix ) && !$ prefix instanceof \Traversable) {
539- throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , \get_class ( $ this ) ));
539+ throw new \TypeError (sprintf ('Method "%s()" must be overridden by class "%s" to deal with non-iterable values. ' , __FUNCTION__ , static ::class ));
540540 }
541541
542542 foreach ($ prefix as $ prefix ) {
0 commit comments