duck: fix formula style
duck: fix formula style

The alignment of some of the lines in this formula is very odd. It also
hardcodes values when it doesn't need to.

Let's fix that, and reduce the number of `if` statements while we're at
it.

Closes #88728.

Signed-off-by: Dawid Dziurla <c4a7db180859322ef5630a1dfc2805b5bc97fc25@gmail.com>
Signed-off-by: BrewTestBot <8a898ee6867e4f2028e63d2a6319b2224641c06c@users.noreply.github.com>

nandub/homebrew-core,chrisfinazzo/homebrew-core,lemzwerg/homebrew-core,lemzwerg/homebrew-core,sjackman/homebrew-core,Homebrew/homebrew-core,makigumo/homebrew-core,mfikes/homebrew-core,filcab/homebrew-core,nandub/homebrew-core,cblecker/homebrew-core,zyedidia/homebrew-core,mfikes/homebrew-core,cblecker/homebrew-core,nbari/homebrew-core,stgraber/homebrew-core,makigumo/homebrew-core,filcab/homebrew-core,sjackman/homebrew-core,adam-moss/homebrew-core,uyjulian/homebrew-core,uyjulian/homebrew-core,zyedidia/homebrew-core,stgraber/homebrew-core,adam-moss/homebrew-core,Homebrew/homebrew-core,chrisfinazzo/homebrew-core,nbari/homebrew-core