private function getTypeFromTags($tags)
    {
        $tag_types = array('stylesheet', 'script');

        foreach ($tag_types as $tag) {
            if (in_array($tag, $tags)) {
                return $tag;
            }
        }

        return false;
    }