Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 4423-4431 (lines=9) @@
4420
     * @return static
4421
     *                <p>Object with all characters of $str being lowercase.</p>
4422
     */
4423
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
4424
    {
4425
        return static::create(
4426
            $this->utf8::strtolower(
4427
                $this->str,
4428
                $this->encoding,
4429
                false,
4430
                $lang,
4431
                $tryToKeepStringLength
4432
            ),
4433
            $this->encoding
4434
        );
@@ 4578-4584 (lines=7) @@
4575
     * @return static
4576
     *                <p>Object with all characters of $str being uppercase.</p>
4577
     */
4578
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
4579
    {
4580
        return static::create(
4581
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
4582
            $this->encoding
4583
        );
4584
    }
4585
4586
    /**
4587
     * Returns a string with whitespace removed from the start and end of the