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

@@ 752-767 (lines=16) @@
749
 * @param mixed|null $key
750
 * @return Collection
751
 */
752
function prepend($collection, $value, $key = null)
753
{
754
    $generatorFactory = function () use ($collection, $value, $key) {
755
        if ($key === null) {
756
            yield $value;
757
        } else {
758
            yield $key => $value;
759
        }
760
761
        foreach ($collection as $key => $value) {
762
            yield $key => $value;
763
        }
764
    };
765
766
    return new Collection($generatorFactory);
767
}
768
769
/**
770
 * Returns a lazy collection of items in $collection with $value added as last element. If $key is not provided
@@ 778-793 (lines=16) @@
775
 * @param mixed|null $key
776
 * @return Collection
777
 */
778
function append($collection, $value, $key = null)
779
{
780
    $generatorFactory = function () use ($collection, $value, $key) {
781
        foreach ($collection as $k => $v) {
782
            yield $k => $v;
783
        }
784
785
        if ($key === null) {
786
            yield $value;
787
        } else {
788
            yield $key => $value;
789
        }
790
    };
791
792
    return new Collection($generatorFactory);
793
}
794
795
/**
796
 * Returns a lazy collection by removing items from $collection until first item for which $function returns false.