Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 1875-1881 (lines=7) @@
1872
   *
1873
   * @return Stringy Object whose $str has had tabs switched to spaces
1874
   */
1875
  public function toSpaces($tabLength = 4)
1876
  {
1877
    $spaces = UTF8::str_repeat(' ', $tabLength);
1878
    $str = UTF8::str_replace("\t", $spaces, $this->str);
1879
1880
    return static::create($str, $this->encoding);
1881
  }
1882
1883
  /**
1884
   * Converts each occurrence of some consecutive number of spaces, as
@@ 1892-1898 (lines=7) @@
1889
   *
1890
   * @return Stringy Object whose $str has had spaces switched to tabs
1891
   */
1892
  public function toTabs($tabLength = 4)
1893
  {
1894
    $spaces = UTF8::str_repeat(' ', $tabLength);
1895
    $str = UTF8::str_replace($spaces, "\t", $this->str);
1896
1897
    return static::create($str, $this->encoding);
1898
  }
1899
1900
  /**
1901
   * Converts the first character of each word in the string to uppercase.