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

src/Form/Element/NamedFormElement.php 2 locations

@@ 375-381 (lines=7) @@
372
        $relations = explode('.', $path);
373
        $count = count($relations);
374
375
        if ($count === 1) {
376
            $attribute = $model->getAttribute($this->getModelAttributeKey());
377
378
            if (! empty($attribute) || $attribute === 0 || is_null($value)) {
379
                return $attribute;
380
            }
381
        }
382
383
        foreach ($relations as $relation) {
384
            if ($model->{$relation} instanceof Model) {
@@ 389-395 (lines=7) @@
386
                continue;
387
            }
388
389
            if ($count === 2) {
390
                $attribute = $model->getAttribute($relation);
391
392
                if (! empty($attribute) or is_null($value)) {
393
                    return $attribute;
394
                }
395
            }
396
397
            if (is_null($this->getDefaultValue())) {
398
                throw new LogicException("Can not fetch value for field '{$path}'. Probably relation definition is incorrect");