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.
@@ 1622-1632 (lines=11) @@
1619
 * @param array|Traversable $replacementMap
1620
 * @return Collection
1621
 */
1622
function replaceByKeys($collection, $replacementMap)
1623
{
1624
    $generatorFactory = function () use ($collection, $replacementMap) {
1625
        foreach ($collection as $key => $value) {
1626
            $newValue = getOrDefault($replacementMap, $key, $value);
1627
            yield $key => $newValue;
1628
        }
1629
    };
1630
1631
    return new Collection($generatorFactory);
1632
}
1633
1634
/**
1635
 * Dumps a variable into scalar or array (recursively).