Code Duplication    Length = 7-7 lines in 2 locations

src/Transform.php 2 locations

@@ 384-390 (lines=7) @@
381
382
        $results = [];
383
384
        foreach ($array as $key => $value) {
385
            if (is_array($value)) {
386
                $results = array_merge($results, $this->dot($value, $prepend . $key . '.'));
387
            } else {
388
                $results[$prepend . $key] = $value;
389
            }
390
        }
391
392
        return $this->dotted[$cache] = $results;
393
    }
@@ 408-414 (lines=7) @@
405
    {
406
        $flattened = [];
407
408
        foreach ($array as $key => $value) {
409
            if (is_array($value)) {
410
                $flattened = array_merge($flattened, $this->flatten($value, $separator, $prepend . $key . $separator));
411
            } else {
412
                $flattened[$prepend . $key] = $value;
413
            }
414
        }
415
416
        return $flattened;
417
    }