MDL-63422 general: review core loop / switch / case / continue
authorEloy Lafuente (stronk7) <stronk7@moodle.org>
Sun, 7 Oct 2018 21:25:45 +0000 (23:25 +0200)
committerEloy Lafuente (stronk7) <stronk7@moodle.org>
Tue, 30 Oct 2018 23:17:59 +0000 (00:17 +0100)
commitbd5fdcfccd3c5953259fb605b047a91761758260
tree43361703a18164594da363a98314e99291c9ad8e
parent8b019fb70930c48cda037968d3257edc222f8143
MDL-63422 general: review core loop / switch / case / continue

This commit reviews all continue uses in core happening within a
loop / switch / case hierarchy. This does not cover:

- Changes to libraries. Will be handled in another issue / commit.
- Uses out from loops, will be reviewed by other commit.

The policy followed has been:
- When possible, take rid of the continue.
- When clearly the intention was to jump to next element in loop
  change to continue 2
- When it was not clear, keep old behavior switching to break, no
  matter how weird the behavior may be.
18 files changed:
analytics/classes/model.php
blog/classes/privacy/provider.php
competency/classes/privacy/provider.php
grade/querylib.php
lib/gradelib.php
mod/assign/feedback/editpdf/classes/combined_document.php
mod/assign/feedback/editpdf/classes/task/convert_submissions.php
mod/assign/lib.php
mod/chat/chatd.php
mod/choice/lib.php
mod/data/lib.php
mod/feedback/lib.php
mod/forum/lib.php
mod/glossary/lib.php
mod/lesson/lib.php
mod/quiz/lib.php
mod/scorm/lib.php
mod/survey/lib.php