Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2323-2331 (lines=9) @@
2320
     * @return static
2321
     *                <p>Object with all characters of $str being lowercase.</p>
2322
     */
2323
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2324
    {
2325
        return static::create(
2326
            $this->utf8::strtolower(
2327
                $this->str,
2328
                $this->encoding,
2329
                false,
2330
                $lang,
2331
                $tryToKeepStringLength
2332
            ),
2333
            $this->encoding
2334
        );
@@ 2423-2429 (lines=7) @@
2420
     * @return static
2421
     *                <p>Object with all characters of $str being uppercase.</p>
2422
     */
2423
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2424
    {
2425
        return static::create(
2426
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2427
            $this->encoding
2428
        );
2429
    }
2430
2431
    /**
2432
     * Returns a string with whitespace removed from the start and end of the