@@ -92,8 +92,6 @@ public static function wrap(array $values): array
9292
9393 /**
9494 * @param string|string[] $needle
95- *
96- * @return static
9795 */
9896 public function after (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): static
9997 {
@@ -127,8 +125,6 @@ public function after(string|iterable $needle, bool $includeNeedle = false, int
127125
128126 /**
129127 * @param string|string[] $needle
130- *
131- * @return static
132128 */
133129 public function afterLast (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): static
134130 {
@@ -160,15 +156,10 @@ public function afterLast(string|iterable $needle, bool $includeNeedle = false,
160156 return $ this ->slice ($ i );
161157 }
162158
163- /**
164- * @return static
165- */
166159 abstract public function append (string ...$ suffix ): static ;
167160
168161 /**
169162 * @param string|string[] $needle
170- *
171- * @return static
172163 */
173164 public function before (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): static
174165 {
@@ -202,8 +193,6 @@ public function before(string|iterable $needle, bool $includeNeedle = false, int
202193
203194 /**
204195 * @param string|string[] $needle
205- *
206- * @return static
207196 */
208197 public function beforeLast (string |iterable $ needle , bool $ includeNeedle = false , int $ offset = 0 ): static
209198 {
@@ -245,19 +234,13 @@ public function bytesAt(int $offset): array
245234 return '' === $ str ->string ? [] : array_values (unpack ('C* ' , $ str ->string ));
246235 }
247236
248- /**
249- * @return static
250- */
251237 abstract public function camel (): static ;
252238
253239 /**
254240 * @return static[]
255241 */
256242 abstract public function chunk (int $ length = 1 ): array ;
257243
258- /**
259- * @return static
260- */
261244 public function collapseWhitespace (): static
262245 {
263246 $ str = clone $ this ;
@@ -292,9 +275,6 @@ public function endsWith(string|iterable $suffix): bool
292275 return false ;
293276 }
294277
295- /**
296- * @return static
297- */
298278 public function ensureEnd (string $ suffix ): static
299279 {
300280 if (!$ this ->endsWith ($ suffix )) {
@@ -307,9 +287,6 @@ public function ensureEnd(string $suffix): static
307287 return $ this ->replaceMatches ($ regex .($ this ->ignoreCase ? 'i ' : '' ), '$1 ' );
308288 }
309289
310- /**
311- * @return static
312- */
313290 public function ensureStart (string $ prefix ): static
314291 {
315292 $ prefix = new static ($ prefix );
@@ -347,14 +324,8 @@ public function equalsTo(string|iterable $string): bool
347324 return false ;
348325 }
349326
350- /**
351- * @return static
352- */
353327 abstract public function folded (): static ;
354328
355- /**
356- * @return static
357- */
358329 public function ignoreCase (): static
359330 {
360331 $ str = clone $ this ;
@@ -412,9 +383,6 @@ public function isEmpty(): bool
412383 return '' === $ this ->string ;
413384 }
414385
415- /**
416- * @return static
417- */
418386 abstract public function join (array $ strings , string $ lastGlue = null ): static ;
419387
420388 public function jsonSerialize (): string
@@ -424,9 +392,6 @@ public function jsonSerialize(): string
424392
425393 abstract public function length (): int ;
426394
427- /**
428- * @return static
429- */
430395 abstract public function lower (): static ;
431396
432397 /**
@@ -438,29 +403,14 @@ abstract public function lower(): static;
438403 */
439404 abstract public function match (string $ regexp , int $ flags = 0 , int $ offset = 0 ): array ;
440405
441- /**
442- * @return static
443- */
444406 abstract public function padBoth (int $ length , string $ padStr = ' ' ): static ;
445407
446- /**
447- * @return static
448- */
449408 abstract public function padEnd (int $ length , string $ padStr = ' ' ): static ;
450409
451- /**
452- * @return static
453- */
454410 abstract public function padStart (int $ length , string $ padStr = ' ' ): static ;
455411
456- /**
457- * @return static
458- */
459412 abstract public function prepend (string ...$ prefix ): static ;
460413
461- /**
462- * @return static
463- */
464414 public function repeat (int $ multiplier ): static
465415 {
466416 if (0 > $ multiplier ) {
@@ -473,36 +423,19 @@ public function repeat(int $multiplier): static
473423 return $ str ;
474424 }
475425
476- /**
477- * @return static
478- */
479426 abstract public function replace (string $ from , string $ to ): static ;
480427
481428 /**
482429 * @param string|callable $to
483- *
484- * @return static
485430 */
486431 abstract public function replaceMatches (string $ fromRegexp , string |callable $ to ): static ;
487432
488- /**
489- * @return static
490- */
491433 abstract public function reverse (): static ;
492434
493- /**
494- * @return static
495- */
496435 abstract public function slice (int $ start = 0 , int $ length = null ): static ;
497436
498- /**
499- * @return static
500- */
501437 abstract public function snake (): static ;
502438
503- /**
504- * @return static
505- */
506439 abstract public function splice (string $ replacement , int $ start = 0 , int $ length = null ): static ;
507440
508441 /**
@@ -571,9 +504,6 @@ public function startsWith(string|iterable $prefix): bool
571504 return false ;
572505 }
573506
574- /**
575- * @return static
576- */
577507 abstract public function title (bool $ allWords = false ): static ;
578508
579509 public function toByteString (string $ toEncoding = null ): ByteString
@@ -622,24 +552,12 @@ public function toUnicodeString(): UnicodeString
622552 return new UnicodeString ($ this ->string );
623553 }
624554
625- /**
626- * @return static
627- */
628555 abstract public function trim (string $ chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" ): static ;
629556
630- /**
631- * @return static
632- */
633557 abstract public function trimEnd (string $ chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" ): static ;
634558
635- /**
636- * @return static
637- */
638559 abstract public function trimStart (string $ chars = " \t\n\r\0\x0B\x0C\u{A0}\u{FEFF}" ): static ;
639560
640- /**
641- * @return static
642- */
643561 public function truncate (int $ length , string $ ellipsis = '' , bool $ cut = true ): static
644562 {
645563 $ stringLength = $ this ->length ();
@@ -667,19 +585,13 @@ public function truncate(int $length, string $ellipsis = '', bool $cut = true):
667585 return $ ellipsisLength ? $ str ->trimEnd ()->append ($ ellipsis ) : $ str ;
668586 }
669587
670- /**
671- * @return static
672- */
673588 abstract public function upper (): static ;
674589
675590 /**
676591 * Returns the printable length on a terminal.
677592 */
678593 abstract public function width (bool $ ignoreAnsiDecoration = true ): int ;
679594
680- /**
681- * @return static
682- */
683595 public function wordwrap (int $ width = 75 , string $ break = "\n" , bool $ cut = false ): static
684596 {
685597 $ lines = '' !== $ break ? $ this ->split ($ break ) : [clone $ this ];
0 commit comments