Code Duplication    Length = 9-9 lines in 2 locations

src/FlexiPeeHP/FlexiBeeRO.php 2 locations

@@ 254-262 (lines=9) @@
251
            if (is_array($objectData) && count($objectData)) {
252
                $result = array_map('self::object2array', $objectData);
253
            }
254
        } else {
255
            if (is_array($object)) {
256
                foreach ($object as $item => $value) {
257
                    $result[$item] = self::object2array($value);
258
                }
259
            } else {
260
                $result = $object;
261
            }
262
        }
263
264
        return $result;
265
    }
@@ 279-287 (lines=9) @@
276
        $result = null;
277
        if (is_object($object)) {
278
            $result = $object->__toString();
279
        } else {
280
            if (is_array($object)) {
281
                foreach ($object as $item => $value) {
282
                    $result[$item] = self::objectToID($value);
283
                }
284
            } else { //String
285
                $result = $object;
286
            }
287
        }
288
289
        return $result;
290
    }