-
Notifications
You must be signed in to change notification settings - Fork 12
Open
Labels
Description
I would like to propose a change to our styleguide. We currently have a lot of functions with var checking like this:
function foobar {
if [ -n "$1" ]; then
# some magic
fi
}I would like to move it to a oneliner:
E_NOTENOUGHPARAMS = 4561
function foobar {
[ -n "$1" ] || return "$E_NOTENOUGHPARAMS"
# some magic
}this would save up one level of indentation. @killermoehre or @dhxgit any opinions on this one?