Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2288-2296 (lines=9) @@
2285
     * @return static
2286
     *                <p>Object with all characters of $str being lowercase.</p>
2287
     */
2288
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2289
    {
2290
        return static::create(
2291
            $this->utf8::strtolower(
2292
                $this->str,
2293
                $this->encoding,
2294
                false,
2295
                $lang,
2296
                $tryToKeepStringLength
2297
            ),
2298
            $this->encoding
2299
        );
@@ 2388-2394 (lines=7) @@
2385
     * @return static
2386
     *                <p>Object with all characters of $str being uppercase.</p>
2387
     */
2388
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2389
    {
2390
        return static::create(
2391
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2392
            $this->encoding
2393
        );
2394
    }
2395
2396
    /**
2397
     * Returns a string with whitespace removed from the start and end of the