Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 1646-1652 (lines=7) @@
1643
   *
1644
   * @return Stringy Object whose $str has had tabs switched to spaces
1645
   */
1646
  public function toSpaces($tabLength = 4)
1647
  {
1648
    $spaces = UTF8::str_repeat(' ', $tabLength);
1649
    $str = UTF8::str_replace("\t", $spaces, $this->str);
1650
1651
    return static::create($str, $this->encoding);
1652
  }
1653
1654
  /**
1655
   * Converts each occurrence of some consecutive number of spaces, as
@@ 1663-1669 (lines=7) @@
1660
   *
1661
   * @return Stringy Object whose $str has had spaces switched to tabs
1662
   */
1663
  public function toTabs($tabLength = 4)
1664
  {
1665
    $spaces = UTF8::str_repeat(' ', $tabLength);
1666
    $str = UTF8::str_replace($spaces, "\t", $this->str);
1667
1668
    return static::create($str, $this->encoding);
1669
  }
1670
1671
  /**
1672
   * Converts the first character of each word in the string to uppercase.