Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 1940-1946 (lines=7) @@
1937
   *
1938
   * @return Stringy Object whose $str has had tabs switched to spaces
1939
   */
1940
  public function toSpaces($tabLength = 4)
1941
  {
1942
    $spaces = UTF8::str_repeat(' ', $tabLength);
1943
    $str = UTF8::str_replace("\t", $spaces, $this->str);
1944
1945
    return static::create($str, $this->encoding);
1946
  }
1947
1948
  /**
1949
   * Converts each occurrence of some consecutive number of spaces, as
@@ 1957-1963 (lines=7) @@
1954
   *
1955
   * @return Stringy Object whose $str has had spaces switched to tabs
1956
   */
1957
  public function toTabs($tabLength = 4)
1958
  {
1959
    $spaces = UTF8::str_repeat(' ', $tabLength);
1960
    $str = UTF8::str_replace($spaces, "\t", $this->str);
1961
1962
    return static::create($str, $this->encoding);
1963
  }
1964
1965
  /**
1966
   * Converts the first character of each word in the string to uppercase.