Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

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