Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

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