Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos, simplify if statement #13233

Merged
merged 1 commit into from
Dec 5, 2018
Merged

Conversation

mattwire
Copy link
Contributor

@mattwire mattwire commented Dec 5, 2018

Overview

Just fix some typos and simplify an if statement (change to if/elseif as the conditions are exclusive)

Before

Typos, slightly more complicated code.

After

Less typos, slightly less complicated code.

@civibot
Copy link

civibot bot commented Dec 5, 2018

(Standard links)

@civibot civibot bot added the master label Dec 5, 2018

// required only if paid event
if ($this->_values['event']['is_monetary'] && !($this->_allowWaitlist || $this->_requireApproval)) {
elseif ($this->_values['event']['is_monetary']) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree this looks equivalent. 👍

  • The removed conditional is the logical opposite of the previous if ($this->_allowWaitlist || $this->_requireApproval) {
  • In the body of the if { ... }, there doesn't appear to be anything which could change the value of $this->_allowWaitlist or $this->_requireApproval.

@totten
Copy link
Member

totten commented Dec 5, 2018

Looks good - mostly NFC, with a small bit of REF that checks out.

@totten totten merged commit 422e8ef into civicrm:master Dec 5, 2018
@mattwire mattwire deleted the typos_simplify branch March 1, 2019 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants