[Phpmyadmin-devel] Maximum length of variable names
michal at cihar.com
Mon Jan 6 11:38:26 CET 2014
Dne Sun, 05 Jan 2014 09:36:10 -0500
Marc Delisle <marc at infomarc.info> napsal(a):
> I'm aware that I'm opening a can of worms, but can we discuss PHPMD rules?
I think those were never actually discussed, we just run then in
Jenkins. So I think it's good idea to discuss coding style beyond
indentation and whitespaces.
> In particular, I find that to obey the maximum variable name (20
> characters) rule, one has to sometimes abbreviate at the expanse of clarity.
I think this is quite connected to line length as well. In case you
have longer variable names and stick with current line length, the code
will be a bit harder to read due to necessary wrapping, for example:
Looking at current long variable names, I see following patterns:
- pma prefix, is that really needed? 
- return values from function called $something_somewhere_html, using
just $result might be even better to understand in this context 
- some variables still being used as globals, thus needing to provide
too much context in their names 
- some probably legitimate usages of long name 
Michal Čihař | http://cihar.com | http://phpmyadmin.net
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 836 bytes
Desc: not available
More information about the Developers