Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2460-2468 (lines=9) @@
2457
     * @return static
2458
     *                <p>Object with all characters of $str being lowercase.</p>
2459
     */
2460
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2461
    {
2462
        return static::create(
2463
            $this->utf8::strtolower(
2464
                $this->str,
2465
                $this->encoding,
2466
                false,
2467
                $lang,
2468
                $tryToKeepStringLength
2469
            ),
2470
            $this->encoding
2471
        );
@@ 2580-2586 (lines=7) @@
2577
     * @return static
2578
     *                <p>Object with all characters of $str being uppercase.</p>
2579
     */
2580
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2581
    {
2582
        return static::create(
2583
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2584
            $this->encoding
2585
        );
2586
    }
2587
2588
    /**
2589
     * Returns a string with whitespace removed from the start and end of the