Code Duplication    Length = 9-9 lines in 2 locations

src/FlexiPeeHP/FlexiBeeRO.php 2 locations

@@ 572-580 (lines=9) @@
569
            if (is_array($objectData) && count($objectData)) {
570
                $result = array_map('self::object2array', $objectData);
571
            }
572
        } else {
573
            if (is_array($object)) {
574
                foreach ($object as $item => $value) {
575
                    $result[$item] = self::object2array($value);
576
                }
577
            } else {
578
                $result = $object;
579
            }
580
        }
581
582
        return $result;
583
    }
@@ 597-605 (lines=9) @@
594
        $result = null;
595
        if (is_object($object)) {
596
            $result = $object->__toString();
597
        } else {
598
            if (is_array($object)) {
599
                foreach ($object as $item => $value) {
600
                    $result[$item] = self::objectToID($value);
601
                }
602
            } else { //String
603
                $result = $object;
604
            }
605
        }
606
607
        return $result;
608
    }