Code Duplication    Length = 20-20 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3428-3447 (lines=20) @@
3425
      $useExceptions = false;
3426
    }
3427
3428
    foreach ($words as $word) {
3429
3430
      if (!$word) {
3431
        continue;
3432
      }
3433
3434
      if (
3435
          $useExceptions === false
3436
          ||
3437
          (
3438
              $useExceptions === true
3439
              &&
3440
              !in_array($word, $exceptions, true)
3441
          )
3442
      ) {
3443
        $word = self::lcfirst($word, $encoding, $cleanUtf8);
3444
      }
3445
3446
      $newWords[] = $word;
3447
    }
3448
3449
    return implode('', $newWords);
3450
  }
@@ 7417-7436 (lines=20) @@
7414
      $useExceptions = false;
7415
    }
7416
7417
    foreach ($words as $word) {
7418
7419
      if (!$word) {
7420
        continue;
7421
      }
7422
7423
      if (
7424
          $useExceptions === false
7425
          ||
7426
          (
7427
              $useExceptions === true
7428
              &&
7429
              !in_array($word, $exceptions, true)
7430
          )
7431
      ) {
7432
        $word = self::ucfirst($word, $encoding);
7433
      }
7434
7435
      $newWords[] = $word;
7436
    }
7437
7438
    return implode('', $newWords);
7439
  }