Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

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