<?xml version="1.0" encoding="iso-8859-1"?>
<rdf:RDF
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns="http://purl.org/rss/1.0/"
    xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
>
    <channel rdf:about="http://pear.php.net/">
    <link>http://pear.php.net/</link>
    <dc:creator>pear-webmaster@lists.php.net</dc:creator>
    <dc:publisher>pear-webmaster@lists.php.net</dc:publisher>
    <dc:language>en-us</dc:language><items>
<rdf:Seq><rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=574"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=573"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=572"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=564"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=563"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=550"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=547"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=538"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=534"/>
<rdf:li rdf:resource="http://pear.php.net/pepr/pepr-proposal-show.php?id=532"/>
</rdf:Seq>
</items>

<title>PEPr: Latest proposals with status Proposed</title>
<description>The latest PEPr proposals with status Proposed</description>
</channel>

<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=574">
 <title>PEPr Proposal [574]: Web Services::Services_oEmbed</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=574</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        Web Services::Services_oEmbed&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/jstump&quot;&gt;Joe Stump&lt;/a&gt;&amp;nbsp;[&lt;a href=&quot;http://www.pear.php.net/wishlist.php/jstump&quot;&gt;Wishlist&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Services_oEmbed is a package for fetching meta data about URI's from oEmbed providers. It currently supports the entire draft specification, including auto-discovery.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
oEmbed (&lt;a href=&quot;http://www.oembed.com/&quot;&gt;http://www.oembed.com&lt;/a&gt;) is an open specification for discovering more information about URI's. oEmbed services return structure meta-data about a URI (e.g. type of object, title, author information, thumbnail details, etc.).
 </content:encoded>
 <dc:date>2008-09-26T20:15:30-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=573">
 <title>PEPr Proposal [573]: Database::MDB2_TableBrowser</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=573</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        Database::MDB2_TableBrowser&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/tewolde&quot;&gt;Isaac Tewolde&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Database table abstraction library&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Use this library to construct table browsing objects out of your database table. These objects allow your code to handle any database table in an abstract way. By freeing your code from the database details it is possible for you to build generic data reporting or manipulation functions that can work with any table.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Put another way, if you really hate using sql in your code, having to piece together bits of sql to make queries...this library gives you an alternative. Currently only the single table browser is implemented. If you need to work with data that spans multiple tables, you can build a table view as this library works with them as well.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
CHANGES:&lt;br /&gt;&lt;br /&gt;
This library has been completely rewritten and is more modular now. The package is now redone as an MDB2 module and the new architechture offers new possibilities.
 </content:encoded>
 <dc:date>2008-09-26T19:08:56-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=572">
 <title>PEPr Proposal [572]: PEAR::Exception2</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=572</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        PEAR::Exception2&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/till&quot;&gt;Till Klampaeckel&lt;/a&gt;&amp;nbsp;[&lt;a href=&quot;http://www.pear.php.net/wishlist.php/till&quot;&gt;Wishlist&lt;/a&gt;]&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
PEAR_Exception2 aims to provide an Exception class for PHP5-compatible PEAR(1) packages to extend from. In contrast to PEAR_Exception, this package provides are more lightweight dependency than the entire PEAR package.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
This would be my proposal, I'm open for suggestions:&lt;br /&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.friendpaste.com/H7ULHnvJ&quot;&gt;http://www.friendpaste.com/H7ULHnvJ&lt;/a&gt;
 </content:encoded>
 <dc:date>2008-09-19T05:55:41-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=564">
 <title>PEPr Proposal [564]: Web Services::ContactsWindows</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=564</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        Web Services::ContactsWindows&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/streety&quot;&gt;Jonathan Street&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Interacts with the Windows Live Contacts API (&lt;a href=&quot;http://dev.live.com/contacts/&quot;&gt;http://dev.live.com/contacts/&lt;/a&gt;).  &lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Currently supports obtaining the address book in both the full format and the invite format.  It does not currently support adding, updating or deleting contacts.  I plan on adding this later.  Hopefully obtaining contact information will meet most needs.
 </content:encoded>
 <dc:date>2008-06-29T15:12:23-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=563">
 <title>PEPr Proposal [563]: Web Services::WindowsDelegatedAuthentication</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=563</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        Web Services::WindowsDelegatedAuthentication&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/streety&quot;&gt;Jonathan Street&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Windows Live ID Delegated Authentication enables third party developers to request access to a users Windows Live ID account.  Essentially it is a proprietary version of OAuth.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
This package supports the main aspects of Windows Live ID Delegated Authentication.  It can be used to generate the url to which a user should be directed to grant you access.  It can then process the returned variables so that a developer can access the users data.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
It does not currently support refreshing the delegation token.  I don't currently expect many (if any) people to have need for this but if I'm wrong I'll add it later.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
To use the service developers will need to register their application.
 </content:encoded>
 <dc:date>2008-06-29T15:03:45-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=550">
 <title>PEPr Proposal [550]: Web Services::Services_GeoNames</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=550</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        Web Services::Services_GeoNames&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/izi&quot;&gt;David Jean Louis&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Services_GeoNames is a PHP interface to the various webservices offered by the GeoNames project.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
You will find all the details at the &lt;a href=&quot;http://services-geonames.googlecode.com/&quot;&gt;project home&lt;/a&gt;
 </content:encoded>
 <dc:date>2008-04-10T02:57:03-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=547">
 <title>PEPr Proposal [547]: Database::SimpleDAO</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=547</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        Database::SimpleDAO&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/sherekan&quot;&gt;Huilen Abed Moure&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
SimpleDAO is a Data Access Object generator for PHP 5 and MySQL applications.
 </content:encoded>
 <dc:date>2008-04-02T19:24:59-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=538">
 <title>PEPr Proposal [538]: RFC::Coding standard enhancements</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=538</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        RFC::Coding standard enhancements&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/cweiske&quot;&gt;Christian Weiske&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
&lt;table border=&quot;0&quot; cellspacing=&quot;0&quot; cellpadding=&quot;0&quot;&gt;&lt;tr&gt;&lt;td&gt;&lt;br /&gt;
&lt;div id=&quot;toc&quot;&gt;&lt;strong&gt;Table of Contents&lt;/strong&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc0&quot;&gt; Introduction&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc1&quot;&gt; Split function definitions onto several lines&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc2&quot;&gt; Split function call on several lines&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc3&quot;&gt; Split long assigments onto several lines&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc4&quot;&gt; Split long &lt;i&gt;if&lt;/i&gt; statements onto several lines&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc5&quot;&gt;Ternary operators&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc6&quot;&gt; Alignment of function parameters&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc7&quot;&gt; Alignment of assignments&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc8&quot;&gt; Array formatting&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc9&quot;&gt; Recommendation: Readability of code blocks.&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc10&quot;&gt; Return early&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
	&lt;div style=&quot;margin-left: -1em;&quot;&gt;&lt;a href=&quot;#toc11&quot;&gt;Notes&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;
&lt;/div&gt;&lt;br /&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc0&quot;&gt; Introduction&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;This RFC defines changes and enhancements to the &lt;a href=&quot;http://pear.php.net/manual/en/standards.php&quot; onclick=&quot;window.open(this.href, '_blank'); return false;&quot;&gt;current Coding Standards&lt;/a&gt; (CS) in PEAR. They are neccessary because the standards are not clear in some cases. With applications like PHP_CodeSniffer being used, is is important that those issues are worked out and tools can deliver reliable warnings and CS errors.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Most of the issues we currently have deal with long lines and how they should be split. General rule of thumb is that when splitting a line, the originating lines are indented by 4 spaces.&lt;br /&gt;&lt;br /&gt;
Futher, the format shall allow it to easily comment out those lines - be it for debugging or development reasons. This implies that closing braces are to be put on a line on its own, and commas at the end of a line.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;While it might seem archaic to some, the 75-80 line rule is still important. Please see &lt;a href=&quot;http://paul-m-jones.com/?p=276&quot; onclick=&quot;window.open(this.href, '_blank'); return false;&quot;&gt;http://paul-m-jones.com/?p=276&lt;/a&gt; for an in-depth discussion on the topic.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc1&quot;&gt; Split function definitions onto several lines&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;Functions with many parameters need to be split onto several lines to keep the 80 chars/line limit.&lt;br /&gt;&lt;br /&gt;
The first parameters may be put onto the same line as the function name if there is enough space.&lt;br /&gt;&lt;br /&gt;
Subsequent parameters on following lines are to be indented 4 spaces. The closing parenthesis and the opening brace are to be put onto the next line, on the same indentation level as the &amp;quot;function&amp;quot; keyword.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Example:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;someFunctionWithAVeryLongName&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$firstParameter &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'something'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$secondParameter &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'booooo'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$third &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$fourthParameter &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$fifthParameter &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;123.12&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$sixthParam &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;true&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//....&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc2&quot;&gt; Split function call on several lines&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;The CS require lines to have a maximum length of 80 chars.&lt;br /&gt;&lt;br /&gt;
Calling functions or methods with many parameters while adhering to CS is impossible in that cases. It should be allowed to split parameters in function calls onto several lines.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Example:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;someObject&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;subObject&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;callThisFunctionWithALongName&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$parameterOne&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$parameterTwo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$aVeryLongParameterThree&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Several parameters per line should be allowed. Parameters need to be indented 4 spaces compared to the level of the function call. The opening parenthesis is to be put at the end of the function call line, the closing parenthesis gets its own line at the end of the parameters. This shows a visual end to the parameter indentations and follows the opening/closing brace rules for functions and conditionals. (See &lt;a href=&quot;http://pear.php.net/bugs/bug.php?id=11562&quot; onclick=&quot;window.open(this.href, '_blank'); return false;&quot;&gt;bug #11562&lt;/a&gt;)&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;The same applies not only for parameter variables, but also for nested function calls and for arrays.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Example:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;someObject&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;subObject&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;callThisFunctionWithALongName&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;someOtherFunc&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;br /&gt;
        &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;someEvenOtherFunc&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;br /&gt;
            &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'Help me!'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;br /&gt;
            array(&lt;br /&gt;
                &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'foo'  &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'bar'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;br /&gt;
                &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'spam' &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'eggs'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;br /&gt;
            ),&lt;br /&gt;
            &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;23&lt;br /&gt;
        &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;),&lt;br /&gt;
        &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;someEvenOtherFunc&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;()&lt;br /&gt;
    ),&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;wowowowowow&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;12&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;
);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Nesting those function parameters is allowed if it helps to make the code more readable, not only when it is necessary when the characters per line limit is reached.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Using fluent application programming interfaces often leads to many concatenated function calls. Those calls may be split onto several lines. When doing this, all subsequent lines are indented by 4 spaces and begin with the &amp;quot;-&amp;gt;&amp;quot; arrow.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Example:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$someObject&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;someFunction&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;some&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;parameter&quot;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;
    -&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;someOtherFunc&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;23&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;42&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;
    -&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;andAThirdFunction&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;();&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc3&quot;&gt; Split long assigments onto several lines&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;Assigments may be split onto several lines when the character/line limit would be exceeded. The equal sign has to be positioned onto the following line, and indented by 4 characters.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Example:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$GLOBALS&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'TSFE'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;additionalHeaderData&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;strApplicationName&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;br /&gt;
    = &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;xajax&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;getJavascript&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;t3lib_extMgm&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;::&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;siteRelPath&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'nr_xajax'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;));&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc4&quot;&gt; Split long &lt;i&gt;if&lt;/i&gt; statements onto several lines&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;Long &lt;i&gt;if&lt;/i&gt; statements may be split onto several lines when the character/line limit would be exceeded. The conditions have to be positioned onto the following line, and indented 4 characters. The logical operators (&amp;amp;&amp;amp;, ||, etc.) should be at the beginning of the line to make it easier to comment (and exclude) the condition. The closing parenthesis and opening brace get their own line at the end of the conditions.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Keeping the operators at the beginning of the line has two advantages: It is trivial to comment out a particular line during development while keeping syntactically correct code (except of course the first line). Further is the logic kept at the front where it's not forgotten. Scanning such conditions is very easy since they are aligned below each other.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Example:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if ((&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition1&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;|| &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;
    &amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition3&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition4&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//code here&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;} &lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;The first condition may be aligned to the others.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Example:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (   &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition1&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;|| &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition2&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;|| &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition3&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//code here&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;The best case is of course when the line does not need to be split. When the &lt;i&gt;if&lt;/i&gt; clause is really long enough to be split, it might be better to simplify it. In such cases, you could express conditions as variables an compare them in the if() condition. This has the benefit of &amp;quot;naming&amp;quot; and splitting the condition sets into smaller, better understandable chunks:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$is_foo &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition1 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;|| &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition2&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$is_bar &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition3 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condtion4&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$is_foo &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$is_bar&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;// ....&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Note: There were suggestions to indent the parantheses &amp;quot;groups&amp;quot; by 1 space for each grouping. This is too hard to achieve in your coding flow, since your tab key always produces 4 spaces. Indenting the if clauses would take too much finetuning.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc5&quot;&gt;Ternary operators&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;The same rule as for if clauses also applies for the ternary operator: It may be split onto several lines, keeping the question mark and the colon at the front.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$a &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition1 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition2&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;? &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$foo &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bar&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$b &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition3 &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;&amp;amp;&amp;amp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$condition4&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;? &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$foo_man_this_is_too_long_what_should_i_do&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;: &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bar&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc6&quot;&gt; Alignment of function parameters&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;To support readability, parameters in subsequent calls to the same function/method may be aligned by parameter name:&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;callSomeFunction&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'param1'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,     &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'second'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,        &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;callSomeFunction&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'parameter2'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'third'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,         &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;false&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$this&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;-&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;callSomeFunction&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'3'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,          &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'verrrrrrylong'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;true&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc7&quot;&gt; Alignment of assignments&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;To support readability, the equal signs may be aligned in block-related assignments:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$short  &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bar&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$longer &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$baz&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
The rule can be broken when the length of the variable name is at least 8 characters longer/shorter than the previous one:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$short &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bar&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$thisVariableNameIsVeeeeeeeeeeryLong &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$baz&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc8&quot;&gt; Array formatting&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;Assignments in arrays may be aligned. When splitting array definitions onto several lines, the last value may also have a trailing comma. This is valid PHP syntax and helps to keep code diffs minimal:&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
$some_array &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= array(&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'foo'  &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'bar'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'spam' &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;=&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;'ham'&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;,&lt;br /&gt;
);&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc9&quot;&gt; Recommendation: Readability of code blocks.&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;Related lines of code should be grouped into blocks, seperated from each other to keep readability as high as possible. The definition of &amp;quot;related&amp;quot; depends on the code :)&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;For example:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bar &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
}&lt;br /&gt;
if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$spam&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ham &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
}&lt;br /&gt;
if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pinky&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$brain &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
is a lot easier to read when seperated:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bar &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$spam&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$ham &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$pinky&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$brain &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;= &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc10&quot;&gt; Return early&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;To keep readability in functions and methods, it is wise to return early if simple conditions apply that can be checked at the beginning of a method:&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bar&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$baz&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;
{&lt;br /&gt;
    if (&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
        &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//assume&lt;br /&gt;
        //that&lt;br /&gt;
        //here&lt;br /&gt;
        //is&lt;br /&gt;
        //the&lt;br /&gt;
        //whole&lt;br /&gt;
        //logic&lt;br /&gt;
        //of&lt;br /&gt;
        //this&lt;br /&gt;
        //method&lt;br /&gt;
        &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$calculated_value&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
    } else {&lt;br /&gt;
        return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;It's better to return early, keeping indentation and brain power needed to follow the code low.&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;br /&gt;
&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$bar&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$baz&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;)&lt;br /&gt;
{&lt;br /&gt;
    if (!&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$foo&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;) {&lt;br /&gt;
        return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;null&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #FF8000&quot;&gt;//assume&lt;br /&gt;
    //that&lt;br /&gt;
    //here&lt;br /&gt;
    //is&lt;br /&gt;
    //the&lt;br /&gt;
    //whole&lt;br /&gt;
    //logic&lt;br /&gt;
    //of&lt;br /&gt;
    //this&lt;br /&gt;
    //method&lt;br /&gt;
    &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$calculated_value&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;;&lt;br /&gt;
}&lt;br /&gt;
&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;?&amp;gt;&lt;/span&gt;&lt;br /&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;h1 id=&quot;toc11&quot;&gt;Notes&lt;/h1&gt;&lt;br /&gt;
&lt;p&gt;We should keep to the 4 space indentation rule. Allowing 6, 8 or any other number for &amp;quot;personal preference&amp;quot; is an absurd line in a &amp;quot;standard&amp;quot;.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;p&gt;Of course, the best rule is keeping your code easy and clean, avoing dozens of parameters to a function (&amp;quot;code smell&amp;quot; for long parameter lists). But sometimes there is no way to avoid functions with 6 parameters, and having default values for them does not simplfy the situation. The rules here are exactly for that code lines.&lt;/p&gt;&lt;br /&gt;
&lt;br /&gt;

 </content:encoded>
 <dc:date>2008-03-07T11:34:53-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=534">
 <title>PEPr Proposal [534]: HTML::HTML_Form_Error</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=534</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        HTML::HTML_Form_Error&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/jan267&quot;&gt;Jacopo Andrea Nuzzi&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
With this application you can easily validate fields of your form.&lt;br /&gt;&lt;br /&gt;
 This class could also be used to validate query strings.&lt;br /&gt;&lt;br /&gt;
 &lt;br /&gt;&lt;br /&gt;
 You can use HTML_Form_Error with several languages:&lt;br /&gt;&lt;br /&gt;
 * English&lt;br /&gt;&lt;br /&gt;
 * Italian&lt;br /&gt;&lt;br /&gt;
 If you are interested to implement/improve or add a new translation feel free to send an email to jacoz@php.net
 </content:encoded>
 <dc:date>2008-03-02T04:14:55-05:00</dc:date>
</item>
<item rdf:about="http://pear.php.net/pepr/pepr-proposal-show.php?id=532">
 <title>PEPr Proposal [532]: Validate::Validate_IT</title>
 <link>http://pear.php.net/pepr/pepr-proposal-show.php?id=532</link>
 <content:encoded>&lt;br /&gt;
Proposed package:        Validate::Validate_IT&lt;br /&gt;&lt;br /&gt;
Proposer:                &lt;a href=&quot;/user/jan267&quot;&gt;Jacopo Andrea Nuzzi&lt;/a&gt;&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;&lt;br /&gt;
Validation class for Italy.&lt;br /&gt;&lt;br /&gt;
This class provides methods to validate:&lt;br /&gt;&lt;br /&gt;
&lt;ol&gt;&lt;li&gt;Postal code (CAP)&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Telephone number (and prefix)&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Mobile number (and prefix)&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Regions (and regions code)&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Cities (and cities code)&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;li&gt;Fiscal code&lt;br /&gt;&lt;br /&gt;
&lt;/li&gt;&lt;/ol&gt;
 </content:encoded>
 <dc:date>2008-02-23T09:36:16-05:00</dc:date>
</item>

</rdf:RDF>