private function flatten(array $references)
    {
        $result = array();

        foreach ($references as $currentPath => $currentReferences) {
            if (!isset($result[$currentPath])) {
                $result[$currentPath] = reset($currentReferences);
            }
        }

        return $result;
    }
private function flatten(array $references)
    {
        $result = array();

        foreach ($references as $currentPath => $currentReferences) {
            if (!isset($result[$currentPath])) {
                $result[$currentPath] = reset($currentReferences);
            }
        }

        return $result;
    }
private function flatten ( array $ references ) { $ result = array ( ) ; foreach ( $ references as $ currentPath => $ currentReferences ) { if ( ! isset ( $ result [ $ currentPath ] ) ) { $ result [ $ currentPath ] = reset ( $ currentReferences ) ; } } return $ result ; }
Flattens a two-level reference array into a one-level array.

For each entry on the first level, only the first entry of the second
level is included in the result.

Each reference returned by this method can be:

* `null`
* a link starting with `@`
* an absolute filesystem path

The keys of the returned array are Puli paths. Their order is undefined.

@param array $references A two-level reference array as returned by
{@link searchReferences()}.

@return string[]|null[] A one-level array of references with Puli paths
as keys.
Flattens a two - level reference array into a one - level array .