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

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