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

src/helpers.php 2 locations

@@ 28-37 (lines=10) @@
25
    return true;
26
}
27
28
function starts_with($haystack, $needles): bool
29
{
30
    foreach ((array) $needles as $needle) {
31
        if ($needle != '' && substr($haystack, 0, length($needle)) === (string) $needle) {
32
            return true;
33
        }
34
    }
35
36
    return false;
37
}
38
39
/**
40
 * Determine if a given string ends with a given substring.
@@ 47-56 (lines=10) @@
44
 *
45
 * @return bool
46
 */
47
function ends_with(string $haystack, $needles): bool
48
{
49
    foreach ((array) $needles as $needle) {
50
        if ((string) $needle === substr($haystack, -length($needle))) {
51
            return true;
52
        }
53
    }
54
55
    return false;
56
}
57
58
/**
59
 * Returns the portion of string specified by the start and length parameters.