Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 3400-3408 (lines=9) @@
3397
     * @return static
3398
     *                <p>Object with all characters of $str being lowercase.</p>
3399
     */
3400
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
3401
    {
3402
        return static::create(
3403
            $this->utf8::strtolower(
3404
                $this->str,
3405
                $this->encoding,
3406
                false,
3407
                $lang,
3408
                $tryToKeepStringLength
3409
            ),
3410
            $this->encoding
3411
        );
@@ 3532-3538 (lines=7) @@
3529
     * @return static
3530
     *                <p>Object with all characters of $str being uppercase.</p>
3531
     */
3532
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
3533
    {
3534
        return static::create(
3535
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
3536
            $this->encoding
3537
        );
3538
    }
3539
3540
    /**
3541
     * Returns a string with whitespace removed from the start and end of the