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

src/Variables.php 2 locations

@@ 335-354 (lines=20) @@
332
333
        $finalPart = array_pop($parts);
334
        $parent = $this->findContext($parts);
335
        while ($parts) {
336
            $part = array_shift($parts);
337
            if ($this->arrayKeyExists($parent, $part)) {
338
                $parent = &$parent[$part];
339
            } elseif ($this->propertyExists($parent, $part)) {
340
                $parent = &$parent->$part;
341
            } else {
342
                $parent = $this->expand($parent);
343
                if (is_object($parent) || is_array($parent)) {
344
                    array_unshift($parts, $part);
345
                    continue;
346
                } else {
347
                    throw new Exception('Can not set values on primitives or null');
348
                }
349
            }
350
            if ($parts && $parent instanceof self && $parent !== $this) {
351
                $parent->set(implode('.', $parts), $value);
352
                return $this;
353
            }
354
        }
355
        $this->filterSpecialNames($finalPart, $value);
356
        if (is_array($parent) || $parent instanceof \ArrayAccess) {
357
            $parent[$finalPart] = $value;
@@ 378-397 (lines=20) @@
375
        $parts = explode('.', $name);
376
        $finalPart = array_pop($parts);
377
        $parent = $this->findContext($parts);
378
        while ($parts) {
379
            $part = array_shift($parts);
380
            if ($this->arrayKeyExists($parent, $part)) {
381
                $parent = &$parent[$part];
382
            } elseif ($this->propertyExists($parent, $part)) {
383
                $parent = &$parent->$part;
384
            } else {
385
                $parent = $this->expand($parent);
386
                if (is_object($parent) || is_array($parent)) {
387
                    array_unshift($parts, $part);
388
                    continue;
389
                } else {
390
                    return $this;
391
                }
392
            }
393
            if ($parts && $parent instanceof self && $parent !== $this) {
394
                $parent->remove(implode('.', $parts));
395
                return $this;
396
            }
397
        }
398
399
        if ($this->arrayKeyExists($parent, $finalPart)) {
400
            unset($parent[$finalPart]);