Re: One more thing ...

From: Date: Mon, 07 Apr 2008 01:36:28 +0000
Subject: Re: One more thing ...
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49678@lists.php.net to get a copy of this message
Greg Sherwood wrote:
Helgi Þormar Þorbjörnsson wrote:
Okey that's what I was talking about, 148 should not be an error, not even close And I'm not sure what the heck 195 is about ... Who cares if there is a line break or not ? (I rather like having a line break actually) and for the last error I'm a bit stumped Lets hope Greg can fix those or at least turn them into warnings ......... - Helgi On Sat, Apr 5, 2008 at 5:25 AM, Joe Stump <joe@joestump.net <mailto:joe@joestump.net>> wrote:
    FILE: /Users/jstump/dev/foo.php
    -------------------------------------------------------------------------------- 
    FOUND 3 ERROR(S) AND 1 WARNING(S) AFFECTING 3 LINE(S)
    -------------------------------------------------------------------------------- 
     72 | WARNING | Line exceeds 85 characters; contains 105 characters
     148 | ERROR   | There must be exactly one blank line before the
    tags in
        |         | function comment
     195 | ERROR   | Parameters must appear immediately after the comment
     195 | ERROR   | Expected 1 space after the longest variable name
    -------------------------------------------------------------------------------- 
Yes, the error on line 148 is a phpcs error caused by the previous comments containing valid tag. The parser got a little confused :) Actually, it turns out this is caused by the doc comment containing a tag as the first thing on the line. Specifically, this content causes the problem:
* Below are the tags commonly used for methods. A @param tag is * required for each parameter the method has. The @return and * @access tags are mandatory. The @throws tag is required if the * method uses exceptions. @static is required if the method can * be called statically. The remainder should only be used when * necessary. Please use them in the order they appear here. * phpDocumentor has several other tags available, feel free to use * them. Adding the word "the" before the @access tag on line 3 of that comment stops the error from occurring: * Below are the tags commonly used for methods. A @param tag is * required for each parameter the method has. The @return and * the @access tags are mandatory. The @throws tag is required if the * method uses exceptions. @static is required if the method can * be called statically. The remainder should only be used when * necessary. Please use them in the order they appear here. * phpDocumentor has several other tags available, feel free to use * them. Modifying the current comment parser to change the way it determines which lines contain tags would potentially break other code that should be shown as invalid, so I've left it alone for the moment. Greg

« previous php.pear.dev (#49678) next »