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

core/Pimf/Util/Character.php 2 locations

@@ 62-73 (lines=12) @@
59
     *
60
     * @return string
61
     */
62
    public static function ensureTrailing($needle, $haystack)
63
    {
64
        $needleLength = strlen($needle);
65
        $needlePart = substr($haystack, -1 * $needleLength);
66
67
        if ($needlePart !== $needle) {
68
            // append missing trailing character.
69
            $haystack .= $needle;
70
        }
71
72
        return $haystack;
73
    }
74
75
    /**
76
     * Ensure that a string is starts with a special string.
@@ 88-99 (lines=12) @@
85
     *
86
     * @return string
87
     */
88
    public static function ensureLeading($needle, $haystack)
89
    {
90
        $needleLength = strlen($needle);
91
        $needlePart = substr($haystack, 0, $needleLength);
92
93
        if ($needlePart !== $needle) {
94
            // append missing trailing string
95
            $haystack = $needle . $haystack;
96
        }
97
98
        return $haystack;
99
    }
100
101
    /**
102
     * Delete trailing characters.