Re: cvs: pear /PHP_CompatInfo CompatInfo.php

From: Date: Sat, 02 Sep 2006 10:00:39 +0000
Subject: Re: cvs: pear /PHP_CompatInfo CompatInfo.php
References: 1 2  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-43851@lists.php.net to get a copy of this message
Lukas Kahwe Smith a écrit :
While I am sort of indifferent on the placement of the 'array(' (I would probably prefer how things were before), I do believe that the closing ');' should be moved to a new line without identing. Let me show you what I mean: $options = array_merge( array(
    'file_ext' => array('php', 'php4', 'inc', 'phtml'),
    'is_string' => false,
    'debug' => false,
    'ignore_files' => array()
), $options ); This makes the parameters obvious, it makes it obvious where the function call ends etc. BTW I also saw some discussion on multi line if() formatting I prefer: if (something && (somethingelse1
    || somethingelse2
) && otherstuff ) { .. } Again this formatting makes it obvious what belongs together. I also usually order my if statements in such a way that anything I am most likely to disable during debugging/refactoring is not on the first line. This way I can easily disable parts of the if statement For example: if (something && (somethingelse1
#    || somethingelse2
) # && otherstuff ) { .. } regards, Lukas I totally agree with you about multiline if () formatting , and possibilty to disable part of statement (i used it myself)
but recommandation given by PHP_CodeSniffer about array() seems not to be totally crazy This is why i apply and commit changes. regards Laurent

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