GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Code Duplication    Length = 16-16 lines in 2 locations

src/Str.php 2 locations

@@ 196-211 (lines=16) @@
193
     *
194
     * @return \Spatie\String\Str
195
     */
196
    public function replaceFirst($search, $replace)
197
    {
198
        if ($search == '') {
199
            return $this;
200
        }
201
202
        $position = strpos($this->string, $search);
203
204
        if ($position === false) {
205
            return $this;
206
        }
207
208
        $resultString = substr_replace($this->string, $replace, $position, strlen($search));
209
210
        return new static($resultString);
211
    }
212
213
    /**
214
     * Replace the last occurrence of a string.
@@ 221-236 (lines=16) @@
218
     *
219
     * @return \Spatie\String\Str
220
     */
221
    public function replaceLast($search, $replace)
222
    {
223
        if ($search == '') {
224
            return $this;
225
        }
226
227
        $position = strrpos($this->string, $search);
228
229
        if ($position === false) {
230
            return $this;
231
        }
232
233
        $resultString = substr_replace($this->string, $replace, $position, strlen($search));
234
235
        return new static($resultString);
236
    }
237
238
    /**
239
     * Prefix a string.