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

src/Converter/JsonConverter.php 3 locations

@@ 187-198 (lines=12) @@
184
            }
185
        }
186
187
        if (isset($data[JSONConstants::JSON_REPINFO_CHANGES_ON_TYPE])
188
            && is_array($data[JSONConstants::JSON_REPINFO_CHANGES_ON_TYPE])
189
        ) {
190
            $types = array();
191
            foreach ($data[JSONConstants::JSON_REPINFO_CHANGES_ON_TYPE] as $type) {
192
                if (!empty($type)) {
193
                    $types[] = BaseTypeId::cast($type);
194
                }
195
            }
196
197
            $data[JSONConstants::JSON_REPINFO_CHANGES_ON_TYPE] = $types;
198
        }
199
200
        if (isset($data[JSONConstants::JSON_REPINFO_EXTENDED_FEATURES])
201
            && is_array($data[JSONConstants::JSON_REPINFO_EXTENDED_FEATURES])
@@ 639-650 (lines=12) @@
636
                );
637
            }
638
        } elseif ($typeDefinition instanceof MutableRelationshipTypeDefinitionInterface) {
639
            if (isset($data[JSONConstants::JSON_TYPE_ALLOWED_SOURCE_TYPES])
640
                && is_array($data[JSONConstants::JSON_TYPE_ALLOWED_SOURCE_TYPES])
641
            ) {
642
                $allowedSourceTypeIds = array();
643
                foreach ($data[JSONConstants::JSON_TYPE_ALLOWED_SOURCE_TYPES] as $allowedSourceTypeId) {
644
                    $allowedSourceTypeId = (string) $allowedSourceTypeId;
645
                    if (!empty($allowedSourceTypeId)) {
646
                        $allowedSourceTypeIds[] = $allowedSourceTypeId;
647
                    }
648
                }
649
                $data[JSONConstants::JSON_TYPE_ALLOWED_SOURCE_TYPES] = $allowedSourceTypeIds;
650
            }
651
            if (isset($data[JSONConstants::JSON_TYPE_ALLOWED_TARGET_TYPES])
652
                && is_array($data[JSONConstants::JSON_TYPE_ALLOWED_TARGET_TYPES])
653
            ) {
@@ 651-662 (lines=12) @@
648
                }
649
                $data[JSONConstants::JSON_TYPE_ALLOWED_SOURCE_TYPES] = $allowedSourceTypeIds;
650
            }
651
            if (isset($data[JSONConstants::JSON_TYPE_ALLOWED_TARGET_TYPES])
652
                && is_array($data[JSONConstants::JSON_TYPE_ALLOWED_TARGET_TYPES])
653
            ) {
654
                $allowedTargetTypeIds = array();
655
                foreach ($data[JSONConstants::JSON_TYPE_ALLOWED_TARGET_TYPES] as $allowedTargetTypeId) {
656
                    $allowedTargetTypeId = (string) $allowedTargetTypeId;
657
                    if (!empty($allowedTargetTypeId)) {
658
                        $allowedTargetTypeIds[] = $allowedTargetTypeId;
659
                    }
660
                }
661
                $data[JSONConstants::JSON_TYPE_ALLOWED_TARGET_TYPES] = $allowedTargetTypeIds;
662
            }
663
        }
664
665
        return $data;