Code Duplication    Length = 3-3 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 5884-5886 (lines=3) @@
5881
    }
5882
5883
    // iconv and mbstring do not support integer $needle
5884
    if ((int)$needle === $needle && $needle >= 0) {
5885
      $needle = (string)self::chr((int)$needle);
5886
    }
5887
5888
    if ($cleanUtf8 === true) {
5889
      // "\mb_strpos" and "\iconv_strpos" returns wrong position,
@@ 6112-6114 (lines=3) @@
6109
   */
6110
  public static function strripos(string $haystack, string $needle, int $offset = 0, string $encoding = 'UTF-8', bool $cleanUtf8 = false)
6111
  {
6112
    if ((int)$needle === $needle && $needle >= 0) {
6113
      $needle = (string)self::chr((int)$needle);
6114
    }
6115
6116
    if (!isset($haystack[0], $needle[0])) {
6117
      return false;