Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2475-2483 (lines=9) @@
2472
     * @return static
2473
     *                <p>Object with all characters of $str being lowercase.</p>
2474
     */
2475
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2476
    {
2477
        return static::create(
2478
            $this->utf8::strtolower(
2479
                $this->str,
2480
                $this->encoding,
2481
                false,
2482
                $lang,
2483
                $tryToKeepStringLength
2484
            ),
2485
            $this->encoding
2486
        );
@@ 2575-2581 (lines=7) @@
2572
     * @return static
2573
     *                <p>Object with all characters of $str being uppercase.</p>
2574
     */
2575
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2576
    {
2577
        return static::create(
2578
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2579
            $this->encoding
2580
        );
2581
    }
2582
2583
    /**
2584
     * Returns a string with whitespace removed from the start and end of the