PHP_CodeSniffer and another alignement case
| From: | Laurent Laville | Date: | Sun, 25 Nov 2007 15:32:53 +0000 |
| Subject: | PHP_CodeSniffer and another alignement case | ||
| Groups: | php.pear.dev | ||
| Request: | Send a blank email to pear-dev+get-48588@lists.php.net to get a copy of this message | ||
In PEAR_PackageUpdate, I used such coding :
341: // Set the file to read PEAR user-defined options from 342: $this->user_file = $user_file; 343: // Set the file to read PEAR system-wide defaults from 344: $this->system_file = $system_file; 345: // Set the file to read PPU user-defined options from 346: $this->pref_file = $pref_file;PHP_CodeSniffer alert me with : 342 | WARNING | Equals sign not aligned correctly; expected 1 space but found
| | 3 spaces
346 | WARNING | Equals sign not aligned correctly; expected 1 space but found
| | 3 spaces
I understand; But if I code, as allowed by PEAR CS,
342: $this->user_file = $user_file; // Set the file to read PEAR user-defined options from 343: $this->system_file = $system_file; // Set the file to read PEAR system-wide defaults from 344: $this->pref_file = $pref_file; // Set the file to read PPU user-defined options fromComment after code, I'll have 342 | WARNING | Line exceeds 85 characters; contains xx characters 343 | WARNING | Line exceeds 85 characters; contains xx characters 344 | WARNING | Line exceeds 85 characters; contains xx characters So There is no solution to fix these warning ?! Except by writing
341: // Set the file to read PEAR user-defined options from 342: $this->user_file = $user_file; 343: // Set the file to read PEAR system-wide defaults from 344: $this->system_file = $system_file; 345: // Set the file to read PPU user-defined options from 346: $this->pref_file = $pref_file;As sugested by phpcs What QA suggest to use in such condition ? Of course I know it's just warnings and solution was found, but I just wanted to ask and know position of other PEAR members (that's all) Laurent