Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

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