-
Task
-
Resolution: Fixed
-
Low
-
None
Note: The original outcome decided in this issue has been completely reverted and left without effect. Please see MDLSITE-7156 for more information about that.
Strikethrough (invalid) original outcome follows this line:
Since the 3rd of February 2023, the following coding style policy will be implemented:
There should be only one blank space before and after the assignment operator "=".
Good example:
...
...
Bad example:
...
...
Voting
Timeframe
Voting for this issue opens immediately (Thursday 26 January 2023) and will remain open until Friday 3 February 2023 at 12pm UTC.
Voting options
The following options are suggested for voting:
Option A
In the new code, only one space before and after = sign:
$forumid = required_param('id', PARAM_INT); |
$userids = optional_param_array('userids', [], PARAM_INT); |
$discussionids = optional_param_array('discids', [], PARAM_INT); |
$from = optional_param_array('from', [], PARAM_INT); |
$to = optional_param_array('to', [], PARAM_INT); |
The existing code will not be bulk-updated at this time. Scope-specific changes (methods, classes) will be allowed in related issues.
Option B
In the new code, the = should be aligned vertically:
$action = required_param('action', PARAM_ALPHA); |
$id = optional_param('entryid', 0, PARAM_INT); |
$confirm = optional_param('confirm', 0, PARAM_BOOL); |
The existing code will not be bulk-updated at this time. Scope-specific changes (methods, classes) will be allowed in related issues.
Option C
No change to the existing coding style. That is to say that both options (A and B) are permitted, though their use should be consistent with the surrounding code.
- has a non-specific relationship to
-
MDLSITE-7156 Revisit the coding style for white spaces around = (voting ends: 2023-03-30 12:00pm UTC)
-
- Closed
-
- links to