You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: projects_finder.rb
    path of file: ./repos/gitlabhq/app/finders/namespaces
    
    the code of the file until where you have to start completion: # frozen_string_lite
    
    def sort(items)
      return items.projects_order_id_desc unless params[:sort]
      return items.order_by_storage_size(:asc) if params[:sort] == :storage_size_asc
      return items.order_by_storage_size(:desc) if params[:sort] == :storage_size_desc

      if params[:sort] == :similarity && params[:search].present?
        return items.sorted_by_similarity_desc(params[:search])
      end