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

src/DaveChild/TextStatistics/Text.php 2 locations

@@ 284-294 (lines=11) @@
281
     * @param   string  $strEncoding  Encoding of text
282
     * @return  int
283
     */
284
    public static function wordCount($strText, $strEncoding = '')
285
    {
286
        if (strlen(trim($strText)) == 0) {
287
            return 0;
288
        }
289
290
        // Will be tripped by em dashes with spaces either side, among other similar characters
291
        $intWords = 1 + self::textLength(preg_replace('`[^ ]`', '', preg_replace('`\s+`', ' ', $strText)), $strEncoding); // Space count + 1 is word count
292
293
        return $intWords;
294
    }
295
296
    /**
297
     * Returns sentence count for text.
@@ 302-312 (lines=11) @@
299
     * @param   string  $strEncoding  Encoding of text
300
     * @return  int
301
     */
302
    public static function sentenceCount($strText, $strEncoding = '')
303
    {
304
        if (strlen(trim($strText)) == 0) {
305
            return 0;
306
        }
307
308
        // Will be tripped up by "Mr." or "U.K.". Not a major concern at this point.
309
        $intSentences = max(1, self::textLength(preg_replace('`[^\.!?]`', '', $strText), $strEncoding));
310
311
        return $intSentences;
312
    }
313
314
    /**
315
     * Returns average words per sentence for text.