#5596 - Fix unnecessary "else if" nesting

  • By
  • Added
  • 9 views
Identifier #5596
Issue type Feature request or suggestion
Title Fix unnecessary "else if" nesting
Status Closed (rejected)
Tags

Roadmap: Over the horizon (custom)

Roadmap: v11 partial implementation (custom)

Type: Standards compliance (custom)

Handling member Deleted
Addon General / Uncategorised
Description PSR-12 does not allow "else if", but this also includes uses like this:

if ($something) {
} else {
if ($something_else) {
}
}

This can (and MUST according to PSR-12) be merged into...

if ($something) {
} elseif ($something_else) {
}

Fix all of these occurrences, document it in coding standards, and try to get code quality checker to pick up on these if possible.
Steps to reproduce

Funded? No
The system will post a comment when this issue is modified (e.g., status changes). To be notified of this, click "Enable comment notifications".

Rating

Unrated