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/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

src/Str.php 1 location

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