Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2427-2435 (lines=9) @@
2424
     * @return static
2425
     *                <p>Object with all characters of $str being lowercase.</p>
2426
     */
2427
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2428
    {
2429
        return static::create(
2430
            $this->utf8::strtolower(
2431
                $this->str,
2432
                $this->encoding,
2433
                false,
2434
                $lang,
2435
                $tryToKeepStringLength
2436
            ),
2437
            $this->encoding
2438
        );
@@ 2547-2553 (lines=7) @@
2544
     * @return static
2545
     *                <p>Object with all characters of $str being uppercase.</p>
2546
     */
2547
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2548
    {
2549
        return static::create(
2550
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2551
            $this->encoding
2552
        );
2553
    }
2554
2555
    /**
2556
     * Returns a string with whitespace removed from the start and end of the