Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2500-2508 (lines=9) @@
2497
     * @return static
2498
     *                <p>Object with all characters of $str being lowercase.</p>
2499
     */
2500
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2501
    {
2502
        return static::create(
2503
            $this->utf8::strtolower(
2504
                $this->str,
2505
                $this->encoding,
2506
                false,
2507
                $lang,
2508
                $tryToKeepStringLength
2509
            ),
2510
            $this->encoding
2511
        );
@@ 2600-2606 (lines=7) @@
2597
     * @return static
2598
     *                <p>Object with all characters of $str being uppercase.</p>
2599
     */
2600
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2601
    {
2602
        return static::create(
2603
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2604
            $this->encoding
2605
        );
2606
    }
2607
2608
    /**
2609
     * Returns a string with whitespace removed from the start and end of the