src/Traits/Collections.php
public static function ease(array $collection, string $glue = '.'): array
    {
        $map = [];
        __::internalEase($map, $collection, $glue);

        return $map;
    }
public static function ease(array $collection, string $glue = '.'): array
    {
        $map = [];
        __::internalEase($map, $collection, $glue);

        return $map;
    }
public static function ease ( array $ collection , string $ glue = '.' ) : array { $ map = [ ] ; __ :: internalEase ( $ map , $ collection , $ glue ) ; return $ map ; }
Flattens a complex collection by mapping each ending leafs value to a key consisting of all previous indexes.

@usage __::ease(['foo' => ['bar' => 'ter'], 'baz' => ['b', 'z']]);
>> '['foo.bar' => 'ter', 'baz.0' => 'b', , 'baz.1' => 'z']'

@param array  $collection array of values
@param string $glue       glue between key path

@return array flatten collection
Flattens a complex collection by mapping each ending leafs value to a key consisting of all previous indexes .