     end
   end
 
-  defp fetch_compile_env(app, key, env) when is_atom(key),
-    do: fetch_compile_env(app, key, [], env)
+  defp fetch_compile_env(app, key, env) when is_atom(key) do
+    fetch_compile_env(app, key, [], env)
+  end
 
   defp fetch_compile_env(app, [key | paths], env) when is_atom(key),
     do: fetch_compile_env(app, key, paths, env)

  defp expand_key_or_path(other, _env),
    do: other

  @doc false
  def __compile_env__(app, key_or_path, default, env) do
    case fetch_compile_env(app, key_or_path, env) do
      {:ok, value} -> value
      :error -> default

    key_or_path = expand_key_or_path(key_or_path, __CALLER__)

    quote do
      Application.compile_env(__ENV__, unquote(app), unquote(key_or_path), unquote(default))
    end
  end

