Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 4289-4297 (lines=9) @@
4286
     * @return static
4287
     *                <p>Object with all characters of $str being lowercase.</p>
4288
     */
4289
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
4290
    {
4291
        return static::create(
4292
            $this->utf8::strtolower(
4293
                $this->str,
4294
                $this->encoding,
4295
                false,
4296
                $lang,
4297
                $tryToKeepStringLength
4298
            ),
4299
            $this->encoding
4300
        );
@@ 4444-4450 (lines=7) @@
4441
     * @return static
4442
     *                <p>Object with all characters of $str being uppercase.</p>
4443
     */
4444
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
4445
    {
4446
        return static::create(
4447
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
4448
            $this->encoding
4449
        );
4450
    }
4451
4452
    /**
4453
     * Returns a string with whitespace removed from the start and end of the