public static function getFolderAsArray($root)
    {
        if (false === is_dir($root)) {
            return null;
        }

        $result = [];
        $folderContent = scandir($root);

        $dirChecks = [
            true,
            false,
        ];

        foreach ($dirChecks as $dirCheck) {
            foreach ($folderContent as $entry) {
                if (true === in_array($entry, self::getDirSymbols())) {
                    continue;
                }

                $path = sprintf('%s/%s', $root, $entry);
                if ($dirCheck === is_dir($path)) {
                    $result[$entry] = self::getFolderAsArray($path);
                }
            }
        }

        return $result;
    }