Fixed Moodle coding errors according to codechecker plugin