Code Duplication    Length = 6-6 lines in 2 locations

src/English/CardinalNumeralGenerator.php 1 location

@@ 77-82 (lines=6) @@
74
                }
75
            }
76
77
            foreach (array_reverse(static::$words, true) as $word_number => $word) {
78
                if ($number >= $word_number) {
79
                    $words[] = static::generate($word_number);
80
                    $number %= $word_number;
81
                }
82
            }
83
            $parts[] = implode('-', $words);
84
85
            return implode(' ', $parts);

src/Russian/CardinalNumeralGenerator.php 1 location

@@ 270-275 (lines=6) @@
267
                }
268
            }
269
270
            foreach (array_reverse(static::$words, true) as $word_number => $word) {
271
                if ($number >= $word_number) {
272
                    $parts[] = static::getCases($word_number, $gender);
273
                    $number %= $word_number;
274
                }
275
            }
276
277
            // make one array with cases and delete 'o/об' prepositional from all parts except the last one
278
            foreach (array(static::IMENIT, static::RODIT, static::DAT, static::VINIT, static::TVORIT, static::PREDLOJ) as $case) {