Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2403-2411 (lines=9) @@
2400
     * @return static
2401
     *                <p>Object with all characters of $str being lowercase.</p>
2402
     */
2403
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2404
    {
2405
        return static::create(
2406
            $this->utf8::strtolower(
2407
                $this->str,
2408
                $this->encoding,
2409
                false,
2410
                $lang,
2411
                $tryToKeepStringLength
2412
            ),
2413
            $this->encoding
2414
        );
@@ 2503-2509 (lines=7) @@
2500
     * @return static
2501
     *                <p>Object with all characters of $str being uppercase.</p>
2502
     */
2503
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2504
    {
2505
        return static::create(
2506
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2507
            $this->encoding
2508
        );
2509
    }
2510
2511
    /**
2512
     * Returns a string with whitespace removed from the start and end of the