Code Duplication    Length = 9-9 lines in 2 locations

src/FlexiPeeHP/FlexiBeeRO.php 2 locations

@@ 567-575 (lines=9) @@
564
            if (is_array($objectData) && count($objectData)) {
565
                $result = array_map('self::object2array', $objectData);
566
            }
567
        } else {
568
            if (is_array($object)) {
569
                foreach ($object as $item => $value) {
570
                    $result[$item] = self::object2array($value);
571
                }
572
            } else {
573
                $result = $object;
574
            }
575
        }
576
577
        return $result;
578
    }
@@ 592-600 (lines=9) @@
589
        $result = null;
590
        if (is_object($object)) {
591
            $result = $object->__toString();
592
        } else {
593
            if (is_array($object)) {
594
                foreach ($object as $item => $value) {
595
                    $result[$item] = self::objectToID($value);
596
                }
597
            } else { //String
598
                $result = $object;
599
            }
600
        }
601
602
        return $result;
603
    }