Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 3685-3693 (lines=9) @@
3682
     * @return static
3683
     *                <p>Object with all characters of $str being lowercase.</p>
3684
     */
3685
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
3686
    {
3687
        return static::create(
3688
            $this->utf8::strtolower(
3689
                $this->str,
3690
                $this->encoding,
3691
                false,
3692
                $lang,
3693
                $tryToKeepStringLength
3694
            ),
3695
            $this->encoding
3696
        );
@@ 3817-3823 (lines=7) @@
3814
     * @return static
3815
     *                <p>Object with all characters of $str being uppercase.</p>
3816
     */
3817
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
3818
    {
3819
        return static::create(
3820
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
3821
            $this->encoding
3822
        );
3823
    }
3824
3825
    /**
3826
     * Returns a string with whitespace removed from the start and end of the