Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 2152-2158 (lines=7) @@
2149
   *
2150
   * @return static  Object whose $str has had tabs switched to spaces
2151
   */
2152
  public function toSpaces($tabLength = 4)
2153
  {
2154
    $spaces = UTF8::str_repeat(' ', $tabLength);
2155
    $str = UTF8::str_replace("\t", $spaces, $this->str);
2156
2157
    return static::create($str, $this->encoding);
2158
  }
2159
2160
  /**
2161
   * Converts each occurrence of some consecutive number of spaces, as
@@ 2169-2175 (lines=7) @@
2166
   *
2167
   * @return static  Object whose $str has had spaces switched to tabs
2168
   */
2169
  public function toTabs($tabLength = 4)
2170
  {
2171
    $spaces = UTF8::str_repeat(' ', $tabLength);
2172
    $str = UTF8::str_replace($spaces, "\t", $this->str);
2173
2174
    return static::create($str, $this->encoding);
2175
  }
2176
2177
  /**
2178
   * Converts the first character of each word in the string to uppercase.