Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 1965-1971 (lines=7) @@
1962
   *
1963
   * @return Stringy Object whose $str has had tabs switched to spaces
1964
   */
1965
  public function toSpaces($tabLength = 4)
1966
  {
1967
    $spaces = UTF8::str_repeat(' ', $tabLength);
1968
    $str = UTF8::str_replace("\t", $spaces, $this->str);
1969
1970
    return static::create($str, $this->encoding);
1971
  }
1972
1973
  /**
1974
   * Converts each occurrence of some consecutive number of spaces, as
@@ 1982-1988 (lines=7) @@
1979
   *
1980
   * @return Stringy Object whose $str has had spaces switched to tabs
1981
   */
1982
  public function toTabs($tabLength = 4)
1983
  {
1984
    $spaces = UTF8::str_repeat(' ', $tabLength);
1985
    $str = UTF8::str_replace($spaces, "\t", $this->str);
1986
1987
    return static::create($str, $this->encoding);
1988
  }
1989
1990
  /**
1991
   * Converts the first character of each word in the string to uppercase.