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

src/Structure.php 2 locations

@@ 222-236 (lines=15) @@
219
        }
220
221
        // class name is string
222
        if (is_string($className)) {
223
            $list = array_map(
224
                function ($dataItem) use ($className) {
225
                    $listItemStructure = new $className();
226
                    if (!($listItemStructure instanceof Structure)) {
227
                        throw new Exception('Wrong structure class specified');
228
                    }
229
                    $listItemStructure->mergeUnmodified($dataItem);
230
                    return $listItemStructure;
231
                },
232
                $data
233
            );
234
235
            return $list;
236
        }
237
238
        // class name id callable
239
        if (is_callable($className)) {
@@ 239-249 (lines=11) @@
236
        }
237
238
        // class name id callable
239
        if (is_callable($className)) {
240
            return array_map(function ($dataItem) use ($className) {
241
                $classNameString = $className($dataItem);
242
                $listItemStructure = new $classNameString;
243
                if (!($listItemStructure instanceof Structure)) {
244
                    throw new Exception('Wrong structure class specified');
245
                }
246
247
                return $listItemStructure->merge($dataItem);
248
            }, $data);
249
        }
250
251
        throw new Exception('Wrong class name specified. Use string or closure');
252
    }