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

lib/Core/Factory/EmailDataFactory.php 2 locations

@@ 124-132 (lines=9) @@
121
        }
122
123
        $content = $data->getContent();
124
        if (array_key_exists($field, $content->fields) &&
125
            !$this->fieldHelper->isFieldEmpty($content, $field)
126
        ) {
127
            $fieldValue = $this->translationHelper->getTranslatedField($content, $field);
128
129
            if ($fieldValue instanceof Field) {
130
                return $fieldValue->value->{$property};
131
            }
132
        }
133
134
        if (!empty($this->config[ConfigurationConstants::DEFAULT_VARIABLES][$field])) {
135
            return $this->config[ConfigurationConstants::DEFAULT_VARIABLES][$field];
@@ 179-188 (lines=10) @@
176
        }
177
178
        $content = $data->getContent();
179
        if (array_key_exists($field, $content->fields) &&
180
            !$this->fieldHelper->isFieldEmpty($content, $field)
181
        ) {
182
            $fieldValue = $this->translationHelper->getTranslatedField($content, $field);
183
184
            if ($fieldValue instanceof Field) {
185
                return [$fieldValue->value->email];
186
            }
187
188
        }
189
190
        if (!empty($this->config[ConfigurationConstants::DEFAULT_VARIABLES][$field])) {
191
            return [$this->config[ConfigurationConstants::DEFAULT_VARIABLES][$field]];