Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 2032-2038 (lines=7) @@
2029
   *
2030
   * @return static  Object whose $str has had tabs switched to spaces
2031
   */
2032
  public function toSpaces($tabLength = 4)
2033
  {
2034
    $spaces = UTF8::str_repeat(' ', $tabLength);
2035
    $str = UTF8::str_replace("\t", $spaces, $this->str);
2036
2037
    return static::create($str, $this->encoding);
2038
  }
2039
2040
  /**
2041
   * Converts each occurrence of some consecutive number of spaces, as
@@ 2049-2055 (lines=7) @@
2046
   *
2047
   * @return static  Object whose $str has had spaces switched to tabs
2048
   */
2049
  public function toTabs($tabLength = 4)
2050
  {
2051
    $spaces = UTF8::str_repeat(' ', $tabLength);
2052
    $str = UTF8::str_replace($spaces, "\t", $this->str);
2053
2054
    return static::create($str, $this->encoding);
2055
  }
2056
2057
  /**
2058
   * Converts the first character of each word in the string to uppercase.