Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 1686-1692 (lines=7) @@
1683
   *
1684
   * @return Stringy Object whose $str has had tabs switched to spaces
1685
   */
1686
  public function toSpaces($tabLength = 4)
1687
  {
1688
    $spaces = UTF8::str_repeat(' ', $tabLength);
1689
    $str = UTF8::str_replace("\t", $spaces, $this->str);
1690
1691
    return static::create($str, $this->encoding);
1692
  }
1693
1694
  /**
1695
   * Converts each occurrence of some consecutive number of spaces, as
@@ 1703-1709 (lines=7) @@
1700
   *
1701
   * @return Stringy Object whose $str has had spaces switched to tabs
1702
   */
1703
  public function toTabs($tabLength = 4)
1704
  {
1705
    $spaces = UTF8::str_repeat(' ', $tabLength);
1706
    $str = UTF8::str_replace($spaces, "\t", $this->str);
1707
1708
    return static::create($str, $this->encoding);
1709
  }
1710
1711
  /**
1712
   * Converts the first character of each word in the string to uppercase.