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

@@ 262-271 (lines=10) @@
259
     */
260
    public function cspn(string $mask, int $start = 0, int $length = null): int
261
    {
262
        if ($length === null) {
263
            $value = strcspn($this->value, $mask, $start);
264
        } else {
265
            $value = strcspn(
266
                $this->value,
267
                $mask,
268
                $start,
269
                $length
270
            );
271
        }
272
273
        return (int) $value;
274
    }
@@ 470-474 (lines=5) @@
467
     */
468
    public function substring(int $start, int $length = null): self
469
    {
470
        if ($length === null) {
471
            $sub = substr($this->value, $start);
472
        } else {
473
            $sub = substr($this->value, $start, $length);
474
        }
475
476
        return new self($sub);
477
    }