I hate to be a big pedantic baddy, but ... can I please ask people writing Moodle code to read the coding guidelines carefully, and in particular to think about the formatting of things like if-else statements so that they fit in with the existing code?
GOOD:
if ($blah or $blah) {
stuff();
} else if ($bloo) {
otherstuff();
}
NOT GOOD:
if ($blah or $blah) << no brackets
stuff();
elseif ($bloo) << should be "else if"
otherstuff();
if($blah or $blah) { << no space after if
stuff();
}
elseif ($bloo) { << elseif and on new line
otherstuff(); << indenting not 4 spaces
}
General developer forum
Coding guidelines reminder
Tato diskuse byla uzavřena, takže již nemůže odpovídat.