protected static function prepareFiles($type, $place)
    {
        self::getProcessedFiles();

        $params['type'] = $type;
        $params['place'] = $place;
        $params['routes'] = self::getRoutesToFolder($type);

        foreach (self::$data[$type][$place] as $id => $file) {
            $path = self::getPathFromUrl($file['url']);

            $params['urls'][$id] = $file['url'];
            $params['files'][$id] = basename($file['url']);
            $params['paths'][$id] = $path;

            if (is_file($path) && self::isModifiedFile($path)) {
                unset($params['urls'][$id]);
                continue;
            }

            $path = $params['routes']['path'] . $params['files'][$id];

            if (is_file($path)) {
                if (self::isModifiedHash($file['url'], $path)) {
                    continue;
                }
                $params['paths'][$id] = $path;
            } elseif (self::isExternalUrl($file['url'])) {
                continue;
            }

            unset($params['urls'][$id]);
        }

        return $params;
    }