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

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