Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 1919-1925 (lines=7) @@
1916
   *
1917
   * @return Stringy Object whose $str has had tabs switched to spaces
1918
   */
1919
  public function toSpaces($tabLength = 4)
1920
  {
1921
    $spaces = UTF8::str_repeat(' ', $tabLength);
1922
    $str = UTF8::str_replace("\t", $spaces, $this->str);
1923
1924
    return static::create($str, $this->encoding);
1925
  }
1926
1927
  /**
1928
   * Converts each occurrence of some consecutive number of spaces, as
@@ 1936-1942 (lines=7) @@
1933
   *
1934
   * @return Stringy Object whose $str has had spaces switched to tabs
1935
   */
1936
  public function toTabs($tabLength = 4)
1937
  {
1938
    $spaces = UTF8::str_repeat(' ', $tabLength);
1939
    $str = UTF8::str_replace($spaces, "\t", $this->str);
1940
1941
    return static::create($str, $this->encoding);
1942
  }
1943
1944
  /**
1945
   * Converts the first character of each word in the string to uppercase.