Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 4415-4423 (lines=9) @@
4412
     * @return static
4413
     *                <p>Object with all characters of $str being lowercase.</p>
4414
     */
4415
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
4416
    {
4417
        return static::create(
4418
            $this->utf8::strtolower(
4419
                $this->str,
4420
                $this->encoding,
4421
                false,
4422
                $lang,
4423
                $tryToKeepStringLength
4424
            ),
4425
            $this->encoding
4426
        );
@@ 4570-4576 (lines=7) @@
4567
     * @return static
4568
     *                <p>Object with all characters of $str being uppercase.</p>
4569
     */
4570
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
4571
    {
4572
        return static::create(
4573
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
4574
            $this->encoding
4575
        );
4576
    }
4577
4578
    /**
4579
     * Returns a string with whitespace removed from the start and end of the