Fix Credo Readability (strict)

- Max line length, implicit try, alias order, zero-arity defs
- String sigils, long comments split; redundant blank lines fixed
This commit is contained in:
Moritz 2026-03-03 17:46:38 +01:00
parent f0a8dfcc21
commit 81ce204502
Signed by: moritz
GPG key ID: 1020A035E5DD0824
48 changed files with 131 additions and 144 deletions

View file

@ -708,11 +708,9 @@ defmodule MvWeb.MemberLive.Index do
end
defp to_sort_id(field) when is_binary(field) do
try do
String.to_existing_atom("sort_#{field}")
rescue
ArgumentError -> :"sort_#{field}"
end
String.to_existing_atom("sort_#{field}")
rescue
ArgumentError -> :"sort_#{field}"
end
defp to_sort_id(field) when is_atom(field), do: :"sort_#{field}"