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

src/collection_functions.php 2 locations

@@ 779-794 (lines=16) @@
776
 * @param mixed|null $key
777
 * @return Collection
778
 */
779
function prepend($collection, $value, $key = null)
780
{
781
    $generatorFactory = function () use ($collection, $value, $key) {
782
        if ($key === null) {
783
            yield $value;
784
        } else {
785
            yield $key => $value;
786
        }
787
788
        foreach ($collection as $key => $value) {
789
            yield $key => $value;
790
        }
791
    };
792
793
    return new Collection($generatorFactory);
794
}
795
796
/**
797
 * Returns a lazy collection of items in $collection with $value added as last element. If $key is not provided
@@ 805-820 (lines=16) @@
802
 * @param mixed|null $key
803
 * @return Collection
804
 */
805
function append($collection, $value, $key = null)
806
{
807
    $generatorFactory = function () use ($collection, $value, $key) {
808
        foreach ($collection as $k => $v) {
809
            yield $k => $v;
810
        }
811
812
        if ($key === null) {
813
            yield $value;
814
        } else {
815
            yield $key => $value;
816
        }
817
    };
818
819
    return new Collection($generatorFactory);
820
}
821
822
/**
823
 * Returns a lazy collection by removing items from $collection until first item for which $function returns false.