User:Jeroen De Dauw/Code style

This is a list of guidelines I'd like to see applied in both core and extensions, but that are not mentioned in the coding conventions manual and are regular not applied in core and extensions.

Sorted DESC by my level of annoyance:


 * Document every function, even if it's just a single line comment, and include @return when something is returned.
 * Use type hinting when possible, and always indicate the parameter types with @param.
 * Indicate visibility level of methods and fields. Using var for fields or just 'function' for methods is unclear, and it's not 2008 any more.
 * Use @since to indicate when a function, field or hook was added, esp for everything non-private. Similarly use @deprecated.
 * Use new lines. New lines before and after every if block and loop, as well as between lines of code that are 'unrelated'.

Another point, although this is 'included' in the coding conventions manual:


 * Follow the bloody coding conventions manual and style guidelines (including indenting and spaces).