Code Duplication    Length = 7-7 lines in 2 locations

src/Stringy.php 2 locations

@@ 2025-2031 (lines=7) @@
2022
   *
2023
   * @return static  Object whose $str has had tabs switched to spaces
2024
   */
2025
  public function toSpaces($tabLength = 4)
2026
  {
2027
    $spaces = UTF8::str_repeat(' ', $tabLength);
2028
    $str = UTF8::str_replace("\t", $spaces, $this->str);
2029
2030
    return static::create($str, $this->encoding);
2031
  }
2032
2033
  /**
2034
   * Converts each occurrence of some consecutive number of spaces, as
@@ 2042-2048 (lines=7) @@
2039
   *
2040
   * @return static  Object whose $str has had spaces switched to tabs
2041
   */
2042
  public function toTabs($tabLength = 4)
2043
  {
2044
    $spaces = UTF8::str_repeat(' ', $tabLength);
2045
    $str = UTF8::str_replace($spaces, "\t", $this->str);
2046
2047
    return static::create($str, $this->encoding);
2048
  }
2049
2050
  /**
2051
   * Converts the first character of each word in the string to uppercase.