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

sources/Module/MarkupValidator.php 2 locations

@@ 202-215 (lines=14) @@
199
     *
200
     * @return string Component class name.
201
     */
202
    private function getComponentClass($componentName)
203
    {
204
        $componentClassKey = self::COMPONENT_CLASS_CONFIG_KEY;
205
        if (isset($this->config[$componentName][$componentClassKey]) === false ||
206
            is_string($this->config[$componentName][$componentClassKey]) === false
207
        ) {
208
            $errorMessage = sprintf('Invalid class configuration of component «%s».', $componentName);
209
            throw new Exception($errorMessage);
210
        }
211
212
        $componentClass = $this->config[$componentName][$componentClassKey];
213
214
        return $componentClass;
215
    }
216
217
    /**
218
     * Returns component configuration parameters.
@@ 224-239 (lines=16) @@
221
     *
222
     * @return array Component configuration parameters.
223
     */
224
    private function getComponentConfiguration($componentName)
225
    {
226
        $componentConfig = array();
227
228
        $componentConfigKey = self::COMPONENT_CONFIG_CONFIG_KEY;
229
        if (isset($this->config[$componentName][$componentConfigKey]) === true) {
230
            if (is_array($this->config[$componentName][$componentConfigKey]) === true) {
231
                $componentConfig = $this->config[$componentName][$componentConfigKey];
232
            } else {
233
                $errorMessage = sprintf('Invalid configuration of component «%s».', $componentName);
234
                throw new Exception($errorMessage);
235
            }
236
        }
237
238
        return $componentConfig;
239
    }
240
}
241