Code Duplication    Length = 7-9 lines in 2 locations

src/Stringy.php 2 locations

@@ 2839-2847 (lines=9) @@
2836
     * @return static
2837
     *                <p>Object with all characters of $str being lowercase.</p>
2838
     */
2839
    public function toLowerCase($tryToKeepStringLength = false, $lang = null): self
2840
    {
2841
        return static::create(
2842
            $this->utf8::strtolower(
2843
                $this->str,
2844
                $this->encoding,
2845
                false,
2846
                $lang,
2847
                $tryToKeepStringLength
2848
            ),
2849
            $this->encoding
2850
        );
@@ 2971-2977 (lines=7) @@
2968
     * @return static
2969
     *                <p>Object with all characters of $str being uppercase.</p>
2970
     */
2971
    public function toUpperCase($tryToKeepStringLength = false, $lang = null): self
2972
    {
2973
        return static::create(
2974
            $this->utf8::strtoupper($this->str, $this->encoding, false, $lang, $tryToKeepStringLength),
2975
            $this->encoding
2976
        );
2977
    }
2978
2979
    /**
2980
     * Returns a string with whitespace removed from the start and end of the