Re: PHP_CodeSniffer 1.2

From: Date: Thu, 05 Nov 2009 21:02:28 +0000
Subject: Re: PHP_CodeSniffer 1.2
References: 1 2 3  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-53034@lists.php.net to get a copy of this message
On 06/11/2009, at 4:29 AM, Bill Shupp wrote:
On Nov 5, 2009, at 12:53 AM, Christian Weiske wrote:
Hi Bill, The correct way is: public function directRequest($url, OpenID_Message $message, array $options = array() ) { .... } see: http://pear.php.net/manual/en/standards.funcdef.php "Split function definitions onto several lines"
I've never noticed this, and don't like it. I think it's much harder to read this way than splitting them on one argument per line. And now, after I've spent lots of time getting my code to pass phpcs 1.1 cleanly in my OpenID package, and now with the upgrade to 1.2, I'm left with 475 warnings or errors to deal with.
You can still print one arg per line, which is also what I prefer and do in the PHP_CodeSniffer package. You just need to meet the indentation rules when you do it: public function directRequest(
    $url,
    OpenID_Message $message,
    array $options = array()
) {
    echo 'hi';
} Greg

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