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

src/collection_functions.php 2 locations

@@ 1270-1282 (lines=13) @@
1267
 * @param array|Traversable ...$collections
1268
 * @return Collection
1269
 */
1270
function diff($collection, ...$collections)
1271
{
1272
    $valuesToCompare = toArray(values(concat(...$collections)));
1273
    $generatorFactory = function () use ($collection, $valuesToCompare) {
1274
        foreach ($collection as $key => $value) {
1275
            if (!in_array($value, $valuesToCompare)) {
1276
                yield $key => $value;
1277
            }
1278
        }
1279
    };
1280
1281
    return new Collection($generatorFactory);
1282
}
1283
1284
/**
1285
 * Returns a lazy collection of items that are in $collection and all the other arguments, indexed by the keys from the
@@ 1292-1304 (lines=13) @@
1289
 * @param array|Traversable ...$collections
1290
 * @return Collection
1291
 */
1292
function intersect($collection, ...$collections)
1293
{
1294
    $valuesToCompare = toArray(values(concat(...$collections)));
1295
    $generatorFactory = function () use ($collection, $valuesToCompare) {
1296
        foreach ($collection as $key => $value) {
1297
            if (in_array($value, $valuesToCompare)) {
1298
                yield $key => $value;
1299
            }
1300
        }
1301
    };
1302
1303
    return new Collection($generatorFactory);
1304
}
1305
1306
/**
1307
 * Returns a lazy collection where keys and values are flipped.