Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2171-2179 (lines=9) @@
2168
     *
2169
     * @return static <p>Object with all characters of $str being lowercase.</p>
2170
     */
2171
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2172
    {
2173
        return static::create(
2174
            $this->utf8::strtolower(
2175
                $this->str, $this->encoding, false, $lang, $tryToKeepStringLength
2176
            ),
2177
            $this->encoding
2178
        );
2179
    }
2180
2181
    /**
2182
     * Converts each tab in the string to some number of spaces, as defined by
@@ 2263-2269 (lines=7) @@
2260
     *
2261
     * @return static <p>Object with all characters of $str being uppercase.</p>
2262
     */
2263
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2264
    {
2265
        return static::create(
2266
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2267
            $this->encoding
2268
        );
2269
    }
2270
2271
    /**
2272
     * Returns a string with whitespace removed from the start and end of the