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

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