Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

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