Code Duplication    Length = 10-10 lines in 2 locations

src/Stringy.php 2 locations

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