Re: Surprising WARNING with PHP_CodeSniffer 1.0.0RC1
| From: | Carsten Wiedmann | Date: | Sat, 03 Nov 2007 14:12:46 +0000 |
| Subject: | Re: Surprising WARNING with PHP_CodeSniffer 1.0.0RC1 | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-48398@lists.php.net to get a copy of this message | ||
Laurent Laville schrieb:
While I'm starting again to work on PHP_CompatInfo, I've run PHP_CodeSniffer 1.0.0RC1 on all files of my package distrib, and found some stranges warnings. 231 | WARNING | Equals sign not aligned with surrounding assignments; expectedHi Laurent, that's the code from this warning: 230| if (file_exists($if)) {| | 23 spaces but found 1 space
231| $options = file($if);
232| $this->options['ignore_files'] = array_map('rtrim', $options);
233| } else {
IMHO it should be [1]:
230| if (file_exists($if)) {
231| $options = file($if);
232| $this->options['ignore_files'] = array_map('rtrim', $options);
233| } else {
or:
230| if (file_exists($if)) {
231| $options = file($if);232|
333| $this->options['ignore_files'] = array_map('rtrim', $options);
234|} else {
308 | WARNING | Line exceeds 85 characters; contains 94 characters308| $this->error = 'ERROR: You must supply at least one file or\ directory to process'; Should be [2] e.g.: 308| $this->error = 'ERROR: You must supply at least one file'
. ' or directory to process';Regards, Carsten [1] http://pear.php.net/manual/en/standards.funcalls.php [2] http://pear.php.net/manual/en/standards.php#standards.indenting