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 [];
@@ 6387-6393 (lines=7) @@
6384
   */
6385
  public static function to_utf8($str, bool $decodeHtmlEntityToUtf8 = false)
6386
  {
6387
    if (\is_array($str) === true) {
6388
      foreach ($str as $k => $v) {
6389
        $str[$k] = self::to_utf8($v, $decodeHtmlEntityToUtf8);
6390
      }
6391
6392
      return $str;
6393
    }
6394
6395
    $str = (string)$str;
6396
    if (!isset($str[0])) {