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
  }
@@ 7466-7485 (lines=20) @@
7463
      $useExceptions = false;
7464
    }
7465
7466
    foreach ($words as $word) {
7467
7468
      if (!$word) {
7469
        continue;
7470
      }
7471
7472
      if (
7473
          $useExceptions === false
7474
          ||
7475
          (
7476
              $useExceptions === true
7477
              &&
7478
              !in_array($word, $exceptions, true)
7479
          )
7480
      ) {
7481
        $word = self::ucfirst($word, $encoding);
7482
      }
7483
7484
      $newWords[] = $word;
7485
    }
7486
7487
    return implode('', $newWords);
7488
  }