Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

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