       :error
 
   """
-  @spec parse_requirement(String.t) :: {:ok, Requirement.t} | :error
+  @spec parse_requirement(String.t()) :: {:ok, Requirement.t()} | :error
   def parse_requirement(string) when is_binary(string) do
     case Version.Parser.parse_requirement(string) do
       {:ok, spec} ->
         {:ok, %Requirement{source: string, matchspec: spec, compiled: false}}
+
       :error ->
         :error
     end

    defp to_matchspec(lexed) do
      if valid_requirement?(lexed) do
        first = to_condition(lexed)
        rest  = Enum.drop(lexed, 2)
        {:ok, [{{:'$1', :'$2', :'$3', :'$4', :'$5'}, [to_condition(first, rest)], [:'$_']}]}
      else
        :error
      end

    end

    def message(%{version: version}) do
      "invalid version: #{inspect(version)}"
    end
  end

