Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 3232-3240 (lines=9) @@
3229
     * @return static
3230
     *                <p>Object with all characters of $str being lowercase.</p>
3231
     */
3232
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
3233
    {
3234
        return static::create(
3235
            $this->utf8::strtolower(
3236
                $this->str,
3237
                $this->encoding,
3238
                false,
3239
                $lang,
3240
                $tryToKeepStringLength
3241
            ),
3242
            $this->encoding
3243
        );
@@ 3364-3370 (lines=7) @@
3361
     * @return static
3362
     *                <p>Object with all characters of $str being uppercase.</p>
3363
     */
3364
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
3365
    {
3366
        return static::create(
3367
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
3368
            $this->encoding
3369
        );
3370
    }
3371
3372
    /**
3373
     * Returns a string with whitespace removed from the start and end of the