Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 3665-3673 (lines=9) @@
3662
     * @return static
3663
     *                <p>Object with all characters of $str being lowercase.</p>
3664
     */
3665
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
3666
    {
3667
        return static::create(
3668
            $this->utf8::strtolower(
3669
                $this->str,
3670
                $this->encoding,
3671
                false,
3672
                $lang,
3673
                $tryToKeepStringLength
3674
            ),
3675
            $this->encoding
3676
        );
@@ 3797-3803 (lines=7) @@
3794
     * @return static
3795
     *                <p>Object with all characters of $str being uppercase.</p>
3796
     */
3797
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
3798
    {
3799
        return static::create(
3800
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
3801
            $this->encoding
3802
        );
3803
    }
3804
3805
    /**
3806
     * Returns a string with whitespace removed from the start and end of the