Code Duplication    Length = 20-20 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 2823-2842 (lines=20) @@
2820
      $useExceptions = false;
2821
    }
2822
2823
    foreach ($words as $word) {
2824
2825
      if (!$word) {
2826
        continue;
2827
      }
2828
2829
      if (
2830
          $useExceptions === false
2831
          ||
2832
          (
2833
              $useExceptions === true
2834
              &&
2835
              !in_array($word, $exceptions, true)
2836
          )
2837
      ) {
2838
        $word = self::lcfirst($word, $encoding, $cleanUtf8);
2839
      }
2840
2841
      $newWords[] = $word;
2842
    }
2843
2844
    return implode('', $newWords);
2845
  }
@@ 6901-6920 (lines=20) @@
6898
      $useExceptions = false;
6899
    }
6900
6901
    foreach ($words as $word) {
6902
6903
      if (!$word) {
6904
        continue;
6905
      }
6906
6907
      if (
6908
          $useExceptions === false
6909
          ||
6910
          (
6911
              $useExceptions === true
6912
              &&
6913
              !in_array($word, $exceptions, true)
6914
          )
6915
      ) {
6916
        $word = self::ucfirst($word, $encoding);
6917
      }
6918
6919
      $newWords[] = $word;
6920
    }
6921
6922
    return implode('', $newWords);
6923
  }