Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2302-2310 (lines=9) @@
2299
     * @return static
2300
     *                <p>Object with all characters of $str being lowercase.</p>
2301
     */
2302
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2303
    {
2304
        return static::create(
2305
            $this->utf8::strtolower(
2306
                $this->str,
2307
                $this->encoding,
2308
                false,
2309
                $lang,
2310
                $tryToKeepStringLength
2311
            ),
2312
            $this->encoding
2313
        );
@@ 2402-2408 (lines=7) @@
2399
     * @return static
2400
     *                <p>Object with all characters of $str being uppercase.</p>
2401
     */
2402
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2403
    {
2404
        return static::create(
2405
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2406
            $this->encoding
2407
        );
2408
    }
2409
2410
    /**
2411
     * Returns a string with whitespace removed from the start and end of the