src/Filesystem/Util/ContentListingFormatter.php
public static function formatListing(string $directory, bool $recursive, array $listing)
    {
        self::$directory = $directory;
        self::$recursive = $recursive;

        $listing = \array_values(
            \array_map(
                ['self', 'addPathInfo'],
                \array_filter($listing, ['self', 'isEntryOutOfScope'])
            )
        );

        return self::sortListing($listing);
    }
public static function formatListing(string $directory, bool $recursive, array $listing)
    {
        self::$directory = $directory;
        self::$recursive = $recursive;

        $listing = \array_values(
            \array_map(
                ['self', 'addPathInfo'],
                \array_filter($listing, ['self', 'isEntryOutOfScope'])
            )
        );

        return self::sortListing($listing);
    }
public static function formatListing ( string $ directory , bool $ recursive , array $ listing ) { self :: $ directory = $ directory ; self :: $ recursive = $ recursive ; $ listing = \ array_values ( \ array_map ( [ 'self' , 'addPathInfo' ] , \ array_filter ( $ listing , [ 'self' , 'isEntryOutOfScope' ] ) ) ) ; return self :: sortListing ( $ listing ) ; }
Format contents listing.

@param string $directory
@param bool   $recursive
@param array  $listing

@return array
Format contents listing .