Code Duplication    Length = 20-20 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 3434-3453 (lines=20) @@
3431
      $useExceptions = false;
3432
    }
3433
3434
    foreach ($words as $word) {
3435
3436
      if (!$word) {
3437
        continue;
3438
      }
3439
3440
      if (
3441
          $useExceptions === false
3442
          ||
3443
          (
3444
              $useExceptions === true
3445
              &&
3446
              !in_array($word, $exceptions, true)
3447
          )
3448
      ) {
3449
        $word = self::lcfirst($word, $encoding, $cleanUtf8);
3450
      }
3451
3452
      $newWords[] = $word;
3453
    }
3454
3455
    return implode('', $newWords);
3456
  }
@@ 7469-7488 (lines=20) @@
7466
      $useExceptions = false;
7467
    }
7468
7469
    foreach ($words as $word) {
7470
7471
      if (!$word) {
7472
        continue;
7473
      }
7474
7475
      if (
7476
          $useExceptions === false
7477
          ||
7478
          (
7479
              $useExceptions === true
7480
              &&
7481
              !in_array($word, $exceptions, true)
7482
          )
7483
      ) {
7484
        $word = self::ucfirst($word, $encoding);
7485
      }
7486
7487
      $newWords[] = $word;
7488
    }
7489
7490
    return implode('', $newWords);
7491
  }