Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4129-4135 (lines=7) @@
4126
   */
4127
  public static function str_split($str, int $len = 1): array
4128
  {
4129
    if (\is_array($str) === true) {
4130
      foreach ($str as $k => $v) {
4131
        $str[$k] = self::str_split($v, $len);
4132
      }
4133
4134
      return $str;
4135
    }
4136
4137
    if (!isset($str[0])) {
4138
      return [];
@@ 6386-6392 (lines=7) @@
6383
   */
6384
  public static function to_utf8($str, bool $decodeHtmlEntityToUtf8 = false)
6385
  {
6386
    if (\is_array($str) === true) {
6387
      foreach ($str as $k => $v) {
6388
        $str[$k] = self::to_utf8($v, $decodeHtmlEntityToUtf8);
6389
      }
6390
6391
      return $str;
6392
    }
6393
6394
    $str = (string)$str;
6395
    if (!isset($str[0])) {