Code Duplication    Length = 9-9 lines in 2 locations

src/FlexiPeeHP/FlexiBeeRO.php 2 locations

@@ 310-318 (lines=9) @@
307
            if (is_array($objectData) && count($objectData)) {
308
                $result = array_map('self::object2array', $objectData);
309
            }
310
        } else {
311
            if (is_array($object)) {
312
                foreach ($object as $item => $value) {
313
                    $result[$item] = self::object2array($value);
314
                }
315
            } else {
316
                $result = $object;
317
            }
318
        }
319
320
        return $result;
321
    }
@@ 335-343 (lines=9) @@
332
        $result = null;
333
        if (is_object($object)) {
334
            $result = $object->__toString();
335
        } else {
336
            if (is_array($object)) {
337
                foreach ($object as $item => $value) {
338
                    $result[$item] = self::objectToID($value);
339
                }
340
            } else { //String
341
                $result = $object;
342
            }
343
        }
344
345
        return $result;
346
    }