Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 2247-2253 (lines=7) @@
2244
   *
2245
   * @return static <p>Object whose $str has had tabs switched to spaces.</p>
2246
   */
2247
  public function toSpaces($tabLength = 4)
2248
  {
2249
    $spaces = UTF8::str_repeat(' ', $tabLength);
2250
    $str = UTF8::str_replace("\t", $spaces, $this->str);
2251
2252
    return static::create($str, $this->encoding);
2253
  }
2254
2255
  /**
2256
   * Converts each occurrence of some consecutive number of spaces, as
@@ 2264-2270 (lines=7) @@
2261
   *
2262
   * @return static <p>Object whose $str has had spaces switched to tabs.</p>
2263
   */
2264
  public function toTabs($tabLength = 4)
2265
  {
2266
    $spaces = UTF8::str_repeat(' ', $tabLength);
2267
    $str = UTF8::str_replace($spaces, "\t", $this->str);
2268
2269
    return static::create($str, $this->encoding);
2270
  }
2271
2272
  /**
2273
   * Converts the first character of each word in the string to uppercase.