We have quite a few instances of if statements being wrapped in an if statement. Surely the two conditions should be combined into a single if??
if (!$this->getCurrentUser()->authorise('core.admin', $data['extension']) && isset($data['rules']) {
unset($data['rules']);
}
Labels |
Added:
No Code Attached Yet
|
Each expression on its own line should make it as readable.
if (
!$this->getCurrentUser()->authorise('core.admin', $data['extension'])
&& isset($data['rules'])
) {
unset($data['rules']);
}
I am working in this issue.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-09-27 18:45:42 |
Closed_By | ⇒ | brianteeman |
the 1st one is more readable imho