VID-1974 setting a border around all gallery images

They also have a special whitespace rule for accessing array properties http://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Ternary_operator, so I've always looked at it that they generally put spaces inside parentheses and not inside square brackets. 

I'd definitely like to see some actual documentation on what to do here.  Looking again at the link you posted though, it does seem in the spirit of the documentation to put spaces around arrays.