Code Duplication    Length = 3-3 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4893-4895 (lines=3) @@
4890
    }
4891
4892
    // iconv and mbstring do not support integer $needle
4893
    if ((int)$needle === $needle && $needle >= 0) {
4894
      $needle = (string)self::chr((int)$needle);
4895
    }
4896
4897
    if ($cleanUtf8 === true) {
4898
      // "\mb_strpos" and "\iconv_strpos" returns wrong position,
@@ 5121-5123 (lines=3) @@
5118
   */
5119
  public static function strripos(string $haystack, string $needle, int $offset = 0, string $encoding = 'UTF-8', bool $cleanUtf8 = false)
5120
  {
5121
    if ((int)$needle === $needle && $needle >= 0) {
5122
      $needle = (string)self::chr((int)$needle);
5123
    }
5124
5125
    if (!isset($haystack[0], $needle[0])) {
5126
      return false;