src/Helpers/HCConfigParseHelper.php
private function sortByPriority(array $filePaths): array
    {
        $toSort = [];

        foreach ($filePaths as $filePath) {
            $file = json_decode(file_get_contents($filePath), true);

            $sequence = Arr::get($file, 'general.sequence', 0);

            $toSort[$sequence][] = $filePath;
        }

        ksort($toSort);

        return Arr::collapse($toSort);
    }
private function sortByPriority(array $filePaths): array
    {
        $toSort = [];

        foreach ($filePaths as $filePath) {
            $file = json_decode(file_get_contents($filePath), true);

            $sequence = Arr::get($file, 'general.sequence', 0);

            $toSort[$sequence][] = $filePath;
        }

        ksort($toSort);

        return Arr::collapse($toSort);
    }
private function sortByPriority ( array $ filePaths ) : array { $ toSort = [ ] ; foreach ( $ filePaths as $ filePath ) { $ file = json_decode ( file_get_contents ( $ filePath ) , true ) ; $ sequence = Arr :: get ( $ file , 'general.sequence' , 0 ) ; $ toSort [ $ sequence ] [ ] = $ filePath ; } ksort ( $ toSort ) ; return Arr :: collapse ( $ toSort ) ; }
Sort hc-config.json files by sequence

@param array $filePaths
@return array
Sort hc - config . json files by sequence