[PEPr] Comment on RFC::Coding standard enhancements
| From: | David Sanders | Date: | Sat, 08 Mar 2008 01:57:35 +0000 |
| Subject: | [PEPr] Comment on RFC::Coding standard enhancements | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-49322@lists.php.net to get a copy of this message | ||
David Sanders (http://pear.php.net/user/shangxiao) has commented on the proposal for RFC::Coding
standard enhancements.
Comment:
I already do all of these suggestions anyway, mostly to meet the archaic
line length rule. However aligning blocks of code is something I can't
live without ;) In addition to aligning assignment statements you might
also want to think about arrays that have been split over several lines:
class Foo
{
public $some_really_long_array = array(
'option_a' => 'blah',
'foo' => 'bar',
... etc ...
}
...and of course splitting regular arrays with indentation.
With regards to splitting method calls, I like Chuck's idea of putting the
method name on the next line.
But my question here is why do we still need 85 characters as the limit?
Is it because code might get emailed? We're not living in the 1980's
anymore... so viewing and printing don't seem to be an issue. This came
about again for me with File_Infopath when I started to add Xpaths which
pushed the line length right out past 85 chars. It was much more readable
to have it all on the one line rather than concatenate strings together on
separate lines.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=538
--
Sent by PEPr, the automatic proposal system at http://pear.php.net