Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 3301-3309 (lines=9) @@
3298
     * @return static
3299
     *                <p>Object with all characters of $str being lowercase.</p>
3300
     */
3301
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
3302
    {
3303
        return static::create(
3304
            $this->utf8::strtolower(
3305
                $this->str,
3306
                $this->encoding,
3307
                false,
3308
                $lang,
3309
                $tryToKeepStringLength
3310
            ),
3311
            $this->encoding
3312
        );
@@ 3433-3439 (lines=7) @@
3430
     * @return static
3431
     *                <p>Object with all characters of $str being uppercase.</p>
3432
     */
3433
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
3434
    {
3435
        return static::create(
3436
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
3437
            $this->encoding
3438
        );
3439
    }
3440
3441
    /**
3442
     * Returns a string with whitespace removed from the start and end of the