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

src/collection_functions.php 2 locations

@@ 932-942 (lines=11) @@
929
 * @param array|Traversable $replacementMap
930
 * @return Collection
931
 */
932
function replace($collection, $replacementMap)
933
{
934
    $generatorFactory = function () use ($collection, $replacementMap) {
935
        foreach ($collection as $key => $value) {
936
            $newValue = getOrDefault($replacementMap, $value, $value);
937
            yield $key => $newValue;
938
        }
939
    };
940
941
    return new Collection($generatorFactory);
942
}
943
944
/**
945
 * Returns a lazy collection of reduction steps.
@@ 1650-1660 (lines=11) @@
1647
 * @param array|Traversable $replacementMap
1648
 * @return Collection
1649
 */
1650
function replaceByKeys($collection, $replacementMap)
1651
{
1652
    $generatorFactory = function () use ($collection, $replacementMap) {
1653
        foreach ($collection as $key => $value) {
1654
            $newValue = getOrDefault($replacementMap, $key, $value);
1655
            yield $key => $newValue;
1656
        }
1657
    };
1658
1659
    return new Collection($generatorFactory);
1660
}
1661
1662
/**
1663
 * Dumps a variable into scalar or array (recursively).