Code Duplication    Length = 4-4 lines in 2 locations

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

@@ 519-522 (lines=4) @@
516
            static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')';
517
        }
518
519
        if (preg_match('/^(' . static::$_cache['uninflected'] . ')$/i', $word, $regs)) {
520
            static::$_cache['pluralize'][$word] = $word;
521
            return $word;
522
        }
523
524
        foreach (static::$_plural as $rule => $replacement) {
525
            if (preg_match($rule, $word)) {
@@ 559-562 (lines=4) @@
556
            static::$_cache['uninflected'] = '(?:' . implode('|', static::$_uninflected) . ')';
557
        }
558
559
        if (preg_match('/^(' . static::$_cache['uninflected'] . ')$/i', $word, $regs)) {
560
            static::$_cache['pluralize'][$word] = $word;
561
            return $word;
562
        }
563
564
        foreach (static::$_singular as $rule => $replacement) {
565
            if (preg_match($rule, $word)) {