Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 3.7.2

Bug #15910 Object operator indention not calculated correctly
Submitted: 2009-02-18 18:16 UTC
From: cybot Assigned: squiz
Status: Closed Package: PHP_CodeSniffer
PHP Version: 5.2.8 OS:
Roadmaps: (Not assigned)    
Subscription  


 [2009-02-18 18:16 UTC] cybot (Sebastian Mendel)
Description: ------------ Object operator indention not calculated correctly Test script: --------------- <?php func( $bar->foo() ) ->bar() ?> Expected result: ---------------- no coding errors Actual result: -------------- phpcs phpcs_fail.php FILE: /mnt/work-server/work-www/www.aida.de/sme/phpcs_fail.php -------------------------------------------------------------------------------- FOUND 2 ERROR(S) AND 0 WARNING(S) AFFECTING 2 LINE(S) -------------------------------------------------------------------------------- 2 | ERROR | Missing file doc comment 6 | ERROR | Object operator not indented correctly; expected 8 spaces but | | found 4 --------------------------------------------------------------------------------

Comments

 [2009-02-20 03:44 UTC] squiz (Greg Sherwood)
-Assigned To: +Assigned To: squiz
 [2009-02-20 05:26 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed
This bug has been fixed in CVS. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better.
 [2009-09-10 20:16 UTC] cweiske (Christian Weiske)
-Status: Closed +Status: Open
 [2009-09-10 20:21 UTC] ricson (Rico Sonntag)
Code like this: $object ->setBar($foo) ->setFoo($bar); Results in errors like: Object operator not indented correctly; expected 16 spaces but found 12
 [2009-09-11 05:37 UTC] squiz (Greg Sherwood)
The accepted changes to the PEAR standard (http://pear.php.net/pepr/pepr-proposal-show.php?id=538) show an example where the first object operator immediately follows the variable. This is assumed by the sniff, which is why it is causing an indentation error.
 [2009-09-11 05:47 UTC] squiz (Greg Sherwood)
-Status: Assigned +Status: Closed
Cause of this issue is different. Moving this to a new bug report: bug #16592