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 = 5-10 lines in 2 locations

StringPrimitive.php 2 locations

@@ 258-267 (lines=10) @@
255
     */
256
    public function cspn(string $mask, int $start = 0, int $length = null): int
257
    {
258
        if ($length === null) {
259
            $value = strcspn($this->value, $mask, $start);
260
        } else {
261
            $value = strcspn(
262
                $this->value,
263
                $mask,
264
                $start,
265
                $length
266
            );
267
        }
268
269
        return (int) $value;
270
    }
@@ 466-470 (lines=5) @@
463
     */
464
    public function substring(int $start, int $length = null): self
465
    {
466
        if ($length === null) {
467
            $sub = substr($this->value, $start);
468
        } else {
469
            $sub = substr($this->value, $start, $length);
470
        }
471
472
        return new self($sub);
473
    }