Code Duplication    Length = 20-20 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3278-3297 (lines=20) @@
3275
      $useExceptions = false;
3276
    }
3277
3278
    foreach ($words as $word) {
3279
3280
      if (!$word) {
3281
        continue;
3282
      }
3283
3284
      if (
3285
          $useExceptions === false
3286
          ||
3287
          (
3288
              $useExceptions === true
3289
              &&
3290
              !\in_array($word, $exceptions, true)
3291
          )
3292
      ) {
3293
        $word = self::lcfirst($word, $encoding, $cleanUtf8);
3294
      }
3295
3296
      $newWords[] = $word;
3297
    }
3298
3299
    return \implode('', $newWords);
3300
  }
@@ 7688-7707 (lines=20) @@
7685
      $useExceptions = false;
7686
    }
7687
7688
    foreach ($words as $word) {
7689
7690
      if (!$word) {
7691
        continue;
7692
      }
7693
7694
      if (
7695
          $useExceptions === false
7696
          ||
7697
          (
7698
              $useExceptions === true
7699
              &&
7700
              !\in_array($word, $exceptions, true)
7701
          )
7702
      ) {
7703
        $word = self::ucfirst($word, $encoding);
7704
      }
7705
7706
      $newWords[] = $word;
7707
    }
7708
7709
    return \implode('', $newWords);
7710
  }