Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 2385-2391 (lines=7) @@
2382
   *
2383
   * @return static <p>Object whose $str has had tabs switched to spaces.</p>
2384
   */
2385
  public function toSpaces(int $tabLength = 4): self
2386
  {
2387
    $spaces = UTF8::str_repeat(' ', $tabLength);
2388
    $str = UTF8::str_replace("\t", $spaces, $this->str);
2389
2390
    return static::create($str, $this->encoding);
2391
  }
2392
2393
  /**
2394
   * Converts each occurrence of some consecutive number of spaces, as
@@ 2402-2408 (lines=7) @@
2399
   *
2400
   * @return static <p>Object whose $str has had spaces switched to tabs.</p>
2401
   */
2402
  public function toTabs(int $tabLength = 4): self
2403
  {
2404
    $spaces = UTF8::str_repeat(' ', $tabLength);
2405
    $str = UTF8::str_replace($spaces, "\t", $this->str);
2406
2407
    return static::create($str, $this->encoding);
2408
  }
2409
2410
  /**
2411
   * Converts the first character of each word in the string to uppercase.