Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 1659-1665 (lines=7) @@
1656
   *
1657
   * @return Stringy Object whose $str has had tabs switched to spaces
1658
   */
1659
  public function toSpaces($tabLength = 4)
1660
  {
1661
    $spaces = UTF8::str_repeat(' ', $tabLength);
1662
    $str = UTF8::str_replace("\t", $spaces, $this->str);
1663
1664
    return static::create($str, $this->encoding);
1665
  }
1666
1667
  /**
1668
   * Converts each occurrence of some consecutive number of spaces, as
@@ 1676-1682 (lines=7) @@
1673
   *
1674
   * @return Stringy Object whose $str has had spaces switched to tabs
1675
   */
1676
  public function toTabs($tabLength = 4)
1677
  {
1678
    $spaces = UTF8::str_repeat(' ', $tabLength);
1679
    $str = UTF8::str_replace($spaces, "\t", $this->str);
1680
1681
    return static::create($str, $this->encoding);
1682
  }
1683
1684
  /**
1685
   * Converts the first character of each word in the string to uppercase.