Code Duplication    Length = 10-10 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5190-5199 (lines=10) @@
5187
      return false;
5188
    }
5189
5190
    if (
5191
        $cleanUtf8 === true
5192
        ||
5193
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5194
    ) {
5195
      // \mb_strripos && iconv_strripos is not tolerant to invalid characters
5196
5197
      $needle = self::clean($needle);
5198
      $haystack = self::clean($haystack);
5199
    }
5200
5201
    if (
5202
        $encoding === 'UTF-8'
@@ 5271-5280 (lines=10) @@
5268
      return false;
5269
    }
5270
5271
    if (
5272
        $cleanUtf8 === true
5273
        ||
5274
        $encoding === true // INFO: the "bool"-check is only a fallback for old versions
5275
    ) {
5276
      // \mb_strrpos && iconv_strrpos is not tolerant to invalid characters
5277
5278
      $needle = self::clean($needle);
5279
      $haystack = self::clean($haystack);
5280
    }
5281
5282
    if (
5283
        $encoding === 'UTF-8'