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 = 15-18 lines in 2 locations

src/Str.php 1 location

@@ 418-435 (lines=18) @@
415
     *
416
     * @return self
417
     */
418
    public function pregReplace(
419
        string $regex,
420
        string $replacement,
421
        int $limit = -1
422
    ): self {
423
        $value = preg_replace(
424
            $regex,
425
            $replacement,
426
            $this->value,
427
            $limit
428
        );
429
430
        if ($value === null) {
431
            throw new RegexException('', preg_last_error());
432
        }
433
434
        return new self($value);
435
    }
436
437
    /**
438
     * Return part of the string

src/StringPrimitive.php 1 location

@@ 447-461 (lines=15) @@
444
     *
445
     * @return self
446
     */
447
    public function pregReplace(string $regex, string $replacement, int $limit = -1): self
448
    {
449
        $value = preg_replace(
450
            $regex,
451
            $replacement,
452
            $this->value,
453
            $limit
454
        );
455
456
        if ($value === null) {
457
            throw new RegexException('', preg_last_error());
458
        }
459
460
        return new self($value);
461
    }
462
463
    /**
464
     * Return part of the string