Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 3185-3193 (lines=9) @@
3182
     * @return static
3183
     *                <p>Object with all characters of $str being lowercase.</p>
3184
     */
3185
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
3186
    {
3187
        return static::create(
3188
            $this->utf8::strtolower(
3189
                $this->str,
3190
                $this->encoding,
3191
                false,
3192
                $lang,
3193
                $tryToKeepStringLength
3194
            ),
3195
            $this->encoding
3196
        );
@@ 3317-3323 (lines=7) @@
3314
     * @return static
3315
     *                <p>Object with all characters of $str being uppercase.</p>
3316
     */
3317
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
3318
    {
3319
        return static::create(
3320
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
3321
            $this->encoding
3322
        );
3323
    }
3324
3325
    /**
3326
     * Returns a string with whitespace removed from the start and end of the