Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 1772-1778 (lines=7) @@
1769
   *
1770
   * @return Stringy Object whose $str has had tabs switched to spaces
1771
   */
1772
  public function toSpaces($tabLength = 4)
1773
  {
1774
    $spaces = UTF8::str_repeat(' ', $tabLength);
1775
    $str = UTF8::str_replace("\t", $spaces, $this->str);
1776
1777
    return static::create($str, $this->encoding);
1778
  }
1779
1780
  /**
1781
   * Converts each occurrence of some consecutive number of spaces, as
@@ 1789-1795 (lines=7) @@
1786
   *
1787
   * @return Stringy Object whose $str has had spaces switched to tabs
1788
   */
1789
  public function toTabs($tabLength = 4)
1790
  {
1791
    $spaces = UTF8::str_repeat(' ', $tabLength);
1792
    $str = UTF8::str_replace($spaces, "\t", $this->str);
1793
1794
    return static::create($str, $this->encoding);
1795
  }
1796
1797
  /**
1798
   * Converts the first character of each word in the string to uppercase.