Code Duplication    Length = 20-20 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3425-3444 (lines=20) @@
3422
      $useExceptions = false;
3423
    }
3424
3425
    foreach ($words as $word) {
3426
3427
      if (!$word) {
3428
        continue;
3429
      }
3430
3431
      if (
3432
          $useExceptions === false
3433
          ||
3434
          (
3435
              $useExceptions === true
3436
              &&
3437
              !in_array($word, $exceptions, true)
3438
          )
3439
      ) {
3440
        $word = self::lcfirst($word, $encoding, $cleanUtf8);
3441
      }
3442
3443
      $newWords[] = $word;
3444
    }
3445
3446
    return implode('', $newWords);
3447
  }
@@ 7473-7492 (lines=20) @@
7470
      $useExceptions = false;
7471
    }
7472
7473
    foreach ($words as $word) {
7474
7475
      if (!$word) {
7476
        continue;
7477
      }
7478
7479
      if (
7480
          $useExceptions === false
7481
          ||
7482
          (
7483
              $useExceptions === true
7484
              &&
7485
              !in_array($word, $exceptions, true)
7486
          )
7487
      ) {
7488
        $word = self::ucfirst($word, $encoding);
7489
      }
7490
7491
      $newWords[] = $word;
7492
    }
7493
7494
    return implode('', $newWords);
7495
  }