2011/7/22 Madhura Jayaratne madhura.cj@gmail.com:
Hi all, Looking at the CheckStyle reports from the CI, all the export files show very high counts of indentation rule violations. The code in the 'else' block of 'if (isset($plugin_list))' condition is wrongly indented in all of these files. There are two possible ways to correct this.
- Correctly indent the 'else' block
- Add 'return' statement to the end of 'if' block and remove 'else {' part.
Which one if preferred?
Looking at the code (I only checked sql.php and xml.php) I wonder why the different functions are defined within the 'else' block. This doesn't seem right to me. There must be cleaner ways of conditionally defining a function than putting them in an if/else block. I'm not sure even how the php compiler parses this? Anyway I don't think we can rely on the behaviour of the php compiler to not define these functions.
Kind regards,
Dieter