Code Duplication    Length = 5-5 lines in 2 locations

vendor/cakephp/cakephp/src/Utility/Inflector.php 2 locations

@@ 509-513 (lines=5) @@
506
            static::$_cache['irregular']['pluralize'] = '(?:' . implode('|', array_keys(static::$_irregular)) . ')';
507
        }
508
509
        if (preg_match('/(.*?(?:\\b|_))(' . static::$_cache['irregular']['pluralize'] . ')$/i', $word, $regs)) {
510
            static::$_cache['pluralize'][$word] = $regs[1] . substr($regs[2], 0, 1) .
511
                substr(static::$_irregular[strtolower($regs[2])], 1);
512
            return static::$_cache['pluralize'][$word];
513
        }
514
515
        if (!isset(static::$_cache['uninflected'])) {
516
            static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')';
@@ 549-553 (lines=5) @@
546
            static::$_cache['irregular']['singular'] = '(?:' . implode('|', static::$_irregular) . ')';
547
        }
548
549
        if (preg_match('/(.*?(?:\\b|_))(' . static::$_cache['irregular']['singular'] . ')$/i', $word, $regs)) {
550
            static::$_cache['singularize'][$word] = $regs[1] . substr($regs[2], 0, 1) .
551
                substr(array_search(strtolower($regs[2]), static::$_irregular), 1);
552
            return static::$_cache['singularize'][$word];
553
        }
554
555
        if (!isset(static::$_cache['uninflected'])) {
556
            static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')';