Code Duplication    Length = 10-10 lines in 2 locations

src/Stringy.php 2 locations

@@ 745-754 (lines=10) @@
742
   *
743
   * @return static <p>Object with the resulting $str after being html decoded.</p>
744
   */
745
  public function htmlDecode(int $flags = ENT_COMPAT): self
746
  {
747
    $str = UTF8::html_entity_decode(
748
        $this->str,
749
        $flags,
750
        $this->encoding
751
    );
752
753
    return static::create($str, $this->encoding);
754
  }
755
756
  /**
757
   * Convert all applicable characters to HTML entities.
@@ 809-818 (lines=10) @@
806
   *
807
   * @return static <p>Object with the resulting $str after being html encoded.</p>
808
   */
809
  public function htmlEncode(int $flags = ENT_COMPAT): self
810
  {
811
    $str = UTF8::htmlentities(
812
        $this->str,
813
        $flags,
814
        $this->encoding
815
    );
816
817
    return static::create($str, $this->encoding);
818
  }
819
820
  /**
821
   * Capitalizes the first word of the string, replaces underscores with