Code Duplication    Length = 11-11 lines in 2 locations

src/Stringy.php 2 locations

@@ 753-763 (lines=11) @@
750
     *
751
     * @return static <p>Object with the resulting $str after being html decoded.</p>
752
     */
753
    public function htmlDecode(int $flags = \ENT_COMPAT): self
754
    {
755
        return static::create(
756
            $this->utf8::html_entity_decode(
757
                $this->str,
758
                $flags,
759
                $this->encoding
760
            ),
761
            $this->encoding
762
        );
763
    }
764
765
    /**
766
     * Convert all applicable characters to HTML entities.
@@ 818-828 (lines=11) @@
815
     *
816
     * @return static <p>Object with the resulting $str after being html encoded.</p>
817
     */
818
    public function htmlEncode(int $flags = \ENT_COMPAT): self
819
    {
820
        return static::create(
821
            $this->utf8::htmlentities(
822
                $this->str,
823
                $flags,
824
                $this->encoding
825
            ),
826
            $this->encoding
827
        );
828
    }
829
830
    /**
831
     * Capitalizes the first word of the string, replaces underscores with