31,014
edits
m (→PHP Norms) |
|||
| Line 73: | Line 73: | ||
** Smart tags PHP are not used. PHP code section must start with '''<?php''' | ** Smart tags PHP are not used. PHP code section must start with '''<?php''' | ||
** But there is an exception of length of line: We accept more than 80 characters per line. 80 is really to low. In most cases, we never go over 80, but sometimes (when declaring a list of reference arrays, like into module descriptor files), it is better to have long lines instead of long page with code content that is just data declaration and does not contains any logic. | ** But there is an exception of length of line: We accept more than 80 characters per line. 80 is really to low. In most cases, we never go over 80, but sometimes (when declaring a list of reference arrays, like into module descriptor files), it is better to have long lines instead of long page with code content that is just data declaration and does not contains any logic. | ||
** The other exception is that we don't replace the tab with space. This | ** The other exception is that we don't replace the tab with space. This makes lot of editor crazy and breaks some auto-format features. | ||
You can use the file dev/codesniffer/ruleset.xml as rule file to control coding style with PHPCodeSniffer. | You can use the file dev/codesniffer/ruleset.xml as rule file to control coding style with PHPCodeSniffer. | ||