Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2260-2268 (lines=9) @@
2257
     * @return static
2258
     *                <p>Object with all characters of $str being lowercase.</p>
2259
     */
2260
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2261
    {
2262
        return static::create(
2263
            $this->utf8::strtolower(
2264
                $this->str,
2265
                $this->encoding,
2266
                false,
2267
                $lang,
2268
                $tryToKeepStringLength
2269
            ),
2270
            $this->encoding
2271
        );
@@ 2360-2366 (lines=7) @@
2357
     * @return static
2358
     *                <p>Object with all characters of $str being uppercase.</p>
2359
     */
2360
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2361
    {
2362
        return static::create(
2363
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2364
            $this->encoding
2365
        );
2366
    }
2367
2368
    /**
2369
     * Returns a string with whitespace removed from the start and end of the