Code Duplication    Length = 7-7 lines in 2 locations

src/voku/helper/UTF8.php 2 locations

@@ 4049-4055 (lines=7) @@
4046
   */
4047
  public static function str_split($str, int $len = 1): array
4048
  {
4049
    if (\is_array($str) === true) {
4050
      foreach ($str as $k => $v) {
4051
        $str[$k] = self::str_split($v, $len);
4052
      }
4053
4054
      return $str;
4055
    }
4056
4057
    if (!isset($str[0])) {
4058
      return [];
@@ 6309-6315 (lines=7) @@
6306
   */
6307
  public static function to_utf8($str, bool $decodeHtmlEntityToUtf8 = false)
6308
  {
6309
    if (\is_array($str) === true) {
6310
      foreach ($str as $k => $v) {
6311
        $str[$k] = self::to_utf8($v, $decodeHtmlEntityToUtf8);
6312
      }
6313
6314
      return $str;
6315
    }
6316
6317
    $str = (string)$str;
6318
    if (!isset($str[0])) {