Code Duplication    Length = 9-9 lines in 2 locations

src/FlexiPeeHP/FlexiBeeRO.php 2 locations

@@ 488-496 (lines=9) @@
485
            if (is_array($objectData) && count($objectData)) {
486
                $result = array_map('self::object2array', $objectData);
487
            }
488
        } else {
489
            if (is_array($object)) {
490
                foreach ($object as $item => $value) {
491
                    $result[$item] = self::object2array($value);
492
                }
493
            } else {
494
                $result = $object;
495
            }
496
        }
497
498
        return $result;
499
    }
@@ 513-521 (lines=9) @@
510
        $result = null;
511
        if (is_object($object)) {
512
            $result = $object->__toString();
513
        } else {
514
            if (is_array($object)) {
515
                foreach ($object as $item => $value) {
516
                    $result[$item] = self::objectToID($value);
517
                }
518
            } else { //String
519
                $result = $object;
520
            }
521
        }
522
523
        return $result;
524
    }