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

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