Code Duplication    Length = 9-9 lines in 2 locations

src/FlexiPeeHP/FlexiBeeRO.php 2 locations

@@ 561-569 (lines=9) @@
558
            if (is_array($objectData) && count($objectData)) {
559
                $result = array_map('self::object2array', $objectData);
560
            }
561
        } else {
562
            if (is_array($object)) {
563
                foreach ($object as $item => $value) {
564
                    $result[$item] = self::object2array($value);
565
                }
566
            } else {
567
                $result = $object;
568
            }
569
        }
570
571
        return $result;
572
    }
@@ 586-594 (lines=9) @@
583
        $result = null;
584
        if (is_object($object)) {
585
            $result = $object->__toString();
586
        } else {
587
            if (is_array($object)) {
588
                foreach ($object as $item => $value) {
589
                    $result[$item] = self::objectToID($value);
590
                }
591
            } else { //String
592
                $result = $object;
593
            }
594
        }
595
596
        return $result;
597
    }