@@ -95,7 +95,7 @@ public static function wrap(array $values): array
9595 *
9696 * @return static
9797 */
98- public function after (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): self
98+ public function after (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): static
9999 {
100100 $ str = clone $ this ;
101101 $ i = \PHP_INT_MAX ;
@@ -130,7 +130,7 @@ public function after(string|iterable $needle, bool $includeNeedle = false, int
130130 *
131131 * @return static
132132 */
133- public function afterLast (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): self
133+ public function afterLast (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): static
134134 {
135135 $ str = clone $ this ;
136136 $ i = null ;
@@ -163,14 +163,14 @@ public function afterLast(string|iterable $needle, bool $includeNeedle = false,
163163 /**
164164 * @return static
165165 */
166- abstract public function append (string ...$ suffix ): self ;
166+ abstract public function append (string ...$ suffix ): static ;
167167
168168 /**
169169 * @param string|string[] $needle
170170 *
171171 * @return static
172172 */
173- public function before (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): self
173+ public function before (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): static
174174 {
175175 $ str = clone $ this ;
176176 $ i = \PHP_INT_MAX ;
@@ -205,7 +205,7 @@ public function before(string|iterable $needle, bool $includeNeedle = false, int
205205 *
206206 * @return static
207207 */
208- public function beforeLast (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): self
208+ public function beforeLast (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): static
209209 {
210210 $ str = clone $ this ;
211211 $ i = null ;
@@ -248,7 +248,7 @@ public function bytesAt(int $offset): array
248248 /**
249249 * @return static
250250 */
251- abstract public function camel (): self ;
251+ abstract public function camel (): static ;
252252
253253 /**
254254 * @return static[]
@@ -258,7 +258,7 @@ abstract public function chunk(int $length = 1): array;
258258 /**
259259 * @return static
260260 */
261- public function collapseWhitespace (): self
261+ public function collapseWhitespace (): static
262262 {
263263 $ str = clone $ this ;
264264 $ str ->string = trim (preg_replace ('/(?:\s{2,}+|[^\S ])/ ' , ' ' , $ str ->string ));
@@ -295,7 +295,7 @@ public function endsWith(string|iterable $suffix): bool
295295 /**
296296 * @return static
297297 */
298- public function ensureEnd (string $ suffix ): self
298+ public function ensureEnd (string $ suffix ): static
299299 {
300300 if (!$ this ->endsWith ($ suffix )) {
301301 return $ this ->append ($ suffix );
@@ -310,7 +310,7 @@ public function ensureEnd(string $suffix): self
310310 /**
311311 * @return static
312312 */
313- public function ensureStart (string $ prefix ): self
313+ public function ensureStart (string $ prefix ): static
314314 {
315315 $ prefix = new static ($ prefix );
316316
@@ -350,12 +350,12 @@ public function equalsTo(string|iterable $string): bool
350350 /**
351351 * @return static
352352 */
353- abstract public function folded (): self ;
353+ abstract public function folded (): static ;
354354
355355 /**
356356 * @return static
357357 */
358- public function ignoreCase (): self
358+ public function ignoreCase (): static
359359 {
360360 $ str = clone $ this ;
361361 $ str ->ignoreCase = true ;
@@ -415,7 +415,7 @@ public function isEmpty(): bool
415415 /**
416416 * @return static
417417 */
418- abstract public function join (array $ strings , string $ lastGlue = null ): self ;
418+ abstract public function join (array $ strings , string $ lastGlue = null ): static ;
419419
420420 public function jsonSerialize (): string
421421 {
@@ -427,7 +427,7 @@ abstract public function length(): int;
427427 /**
428428 * @return static
429429 */
430- abstract public function lower (): self ;
430+ abstract public function lower (): static ;
431431
432432 /**
433433 * Matches the string using a regular expression.
@@ -441,27 +441,27 @@ abstract public function match(string $regexp, int $flags = 0, int $offset = 0):
441441 /**
442442 * @return static
443443 */
444- abstract public function padBoth (int $ length , string $ padStr = ' ' ): self ;
444+ abstract public function padBoth (int $ length , string $ padStr = ' ' ): static ;
445445
446446 /**
447447 * @return static
448448 */
449- abstract public function padEnd (int $ length , string $ padStr = ' ' ): self ;
449+ abstract public function padEnd (int $ length , string $ padStr = ' ' ): static ;
450450
451451 /**
452452 * @return static
453453 */
454- abstract public function padStart (int $ length , string $ padStr = ' ' ): self ;
454+ abstract public function padStart (int $ length , string $ padStr = ' ' ): static ;
455455
456456 /**
457457 * @return static
458458 */
459- abstract public function prepend (string ...$ prefix ): self ;
459+ abstract public function prepend (string ...$ prefix ): static ;
460460
461461 /**
462462 * @return static
463463 */
464- public function repeat (int $ multiplier ): self
464+ public function repeat (int $ multiplier ): static
465465 {
466466 if (0 > $ multiplier ) {
467467 throw new InvalidArgumentException (sprintf ('Multiplier must be positive, %d given. ' , $ multiplier ));
@@ -476,34 +476,34 @@ public function repeat(int $multiplier): self
476476 /**
477477 * @return static
478478 */
479- abstract public function replace (string $ from , string $ to ): self ;
479+ abstract public function replace (string $ from , string $ to ): static ;
480480
481481 /**
482482 * @param string|callable $to
483483 *
484484 * @return static
485485 */
486- abstract public function replaceMatches (string $ fromRegexp , string |callable $ to ): self ;
486+ abstract public function replaceMatches (string $ fromRegexp , string |callable $ to ): static ;
487487
488488 /**
489489 * @return static
490490 */
491- abstract public function reverse (): self ;
491+ abstract public function reverse (): static ;
492492
493493 /**
494494 * @return static
495495 */
496- abstract public function slice (int $ start = 0 , int $ length = null ): self ;
496+ abstract public function slice (int $ start = 0 , int $ length = null ): static ;
497497
498498 /**
499499 * @return static
500500 */
501- abstract public function snake (): self ;
501+ abstract public function snake (): static ;
502502
503503 /**
504504 * @return static
505505 */
506- abstract public function splice (string $ replacement , int $ start = 0 , int $ length = null ): self ;
506+ abstract public function splice (string $ replacement , int $ start = 0 , int $ length = null ): static ;
507507
508508 /**
509509 * @return static[]
@@ -574,7 +574,7 @@ public function startsWith(string|iterable $prefix): bool
574574 /**
575575 * @return static
576576 */
577- abstract public function title (bool $ allWords = false ): self ;
577+ abstract public function title (bool $ allWords = false ): static ;
578578
579579 public function toByteString (string $ toEncoding = null ): ByteString
580580 {
@@ -625,22 +625,22 @@ public function toUnicodeString(): UnicodeString
625625 /**
626626 * @return static
627627 */
628- abstract public function trim (string $ chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" ): self ;
628+ abstract public function trim (string $ chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" ): static ;
629629
630630 /**
631631 * @return static
632632 */
633- abstract public function trimEnd (string $ chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" ): self ;
633+ abstract public function trimEnd (string $ chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" ): static ;
634634
635635 /**
636636 * @return static
637637 */
638- abstract public function trimStart (string $ chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" ): self ;
638+ abstract public function trimStart (string $ chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" ): static ;
639639
640640 /**
641641 * @return static
642642 */
643- public function truncate (int $ length , string $ ellipsis = '' , bool $ cut = true ): self
643+ public function truncate (int $ length , string $ ellipsis = '' , bool $ cut = true ): static
644644 {
645645 $ stringLength = $ this ->length ();
646646
@@ -670,7 +670,7 @@ public function truncate(int $length, string $ellipsis = '', bool $cut = true):
670670 /**
671671 * @return static
672672 */
673- abstract public function upper (): self ;
673+ abstract public function upper (): static ;
674674
675675 /**
676676 * Returns the printable length on a terminal.
@@ -680,7 +680,7 @@ abstract public function width(bool $ignoreAnsiDecoration = true): int;
680680 /**
681681 * @return static
682682 */
683- public function wordwrap (int $ width = 75 , string $ break = "\n" , bool $ cut = false ): self
683+ public function wordwrap (int $ width = 75 , string $ break = "\n" , bool $ cut = false ): static
684684 {
685685 $ lines = '' !== $ break ? $ this ->split ($ break ) : [clone $ this ];
686686 $ chars = [];
0 commit comments