Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

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