Code Duplication    Length = 9-9 lines in 2 locations

src/FlexiPeeHP/FlexiBeeRO.php 2 locations

@@ 435-443 (lines=9) @@
432
            if (is_array($objectData) && count($objectData)) {
433
                $result = array_map('self::object2array', $objectData);
434
            }
435
        } else {
436
            if (is_array($object)) {
437
                foreach ($object as $item => $value) {
438
                    $result[$item] = self::object2array($value);
439
                }
440
            } else {
441
                $result = $object;
442
            }
443
        }
444
445
        return $result;
446
    }
@@ 460-468 (lines=9) @@
457
        $result = null;
458
        if (is_object($object)) {
459
            $result = $object->__toString();
460
        } else {
461
            if (is_array($object)) {
462
                foreach ($object as $item => $value) {
463
                    $result[$item] = self::objectToID($value);
464
                }
465
            } else { //String
466
                $result = $object;
467
            }
468
        }
469
470
        return $result;
471
    }