Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 1782-1788 (lines=7) @@
1779
   *
1780
   * @return Stringy Object whose $str has had tabs switched to spaces
1781
   */
1782
  public function toSpaces($tabLength = 4)
1783
  {
1784
    $spaces = UTF8::str_repeat(' ', $tabLength);
1785
    $str = UTF8::str_replace("\t", $spaces, $this->str);
1786
1787
    return static::create($str, $this->encoding);
1788
  }
1789
1790
  /**
1791
   * Converts each occurrence of some consecutive number of spaces, as
@@ 1799-1805 (lines=7) @@
1796
   *
1797
   * @return Stringy Object whose $str has had spaces switched to tabs
1798
   */
1799
  public function toTabs($tabLength = 4)
1800
  {
1801
    $spaces = UTF8::str_repeat(' ', $tabLength);
1802
    $str = UTF8::str_replace($spaces, "\t", $this->str);
1803
1804
    return static::create($str, $this->encoding);
1805
  }
1806
1807
  /**
1808
   * Converts the first character of each word in the string to uppercase.