Skip to content

Update Styleguide #98

@bastelfreak

Description

@bastelfreak

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?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions