Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4138-4144 (lines=7) @@
4135
   */
4136
  public static function str_split($str, int $len = 1): array
4137
  {
4138
    if (\is_array($str) === true) {
4139
      foreach ($str as $k => $v) {
4140
        $str[$k] = self::str_split($v, $len);
4141
      }
4142
4143
      return $str;
4144
    }
4145
4146
    if (!isset($str[0])) {
4147
      return [];
@@ 6391-6397 (lines=7) @@
6388
   */
6389
  public static function to_utf8($str, bool $decodeHtmlEntityToUtf8 = false)
6390
  {
6391
    if (\is_array($str) === true) {
6392
      foreach ($str as $k => $v) {
6393
        $str[$k] = self::to_utf8($v, $decodeHtmlEntityToUtf8);
6394
      }
6395
6396
      return $str;
6397
    }
6398
6399
    $str = (string)$str;
6400
    if (!isset($str[0])) {