Code Duplication    Length = 3-3 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4795-4797 (lines=3) @@
4792
    }
4793
4794
    // iconv and mbstring do not support integer $needle
4795
    if ((int)$needle === $needle && $needle >= 0) {
4796
      $needle = (string)self::chr((int)$needle);
4797
    }
4798
4799
    if ($cleanUtf8 === true) {
4800
      // "\mb_strpos" and "\iconv_strpos" returns wrong position,
@@ 5023-5025 (lines=3) @@
5020
   */
5021
  public static function strripos(string $haystack, string $needle, int $offset = 0, string $encoding = 'UTF-8', bool $cleanUtf8 = false)
5022
  {
5023
    if ((int)$needle === $needle && $needle >= 0) {
5024
      $needle = (string)self::chr((int)$needle);
5025
    }
5026
5027
    if (!isset($haystack[0], $needle[0])) {
5028
      return false;