Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2281-2289 (lines=9) @@
2278
     * @return static
2279
     *                <p>Object with all characters of $str being lowercase.</p>
2280
     */
2281
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2282
    {
2283
        return static::create(
2284
            $this->utf8::strtolower(
2285
                $this->str,
2286
                $this->encoding,
2287
                false,
2288
                $lang,
2289
                $tryToKeepStringLength
2290
            ),
2291
            $this->encoding
2292
        );
@@ 2381-2387 (lines=7) @@
2378
     * @return static
2379
     *                <p>Object with all characters of $str being uppercase.</p>
2380
     */
2381
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2382
    {
2383
        return static::create(
2384
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2385
            $this->encoding
2386
        );
2387
    }
2388
2389
    /**
2390
     * Returns a string with whitespace removed from the start and end of the