Re: [PEAR-DEV] PEAR Coding Standards
[email protected] (Vasil Rangelov) Thu, 17 Mar 2016 23:32:37 +0200
| Newsgroups | php.pear.dev |
|---|---|
| Message-ID | <CAKfX0nWyGTu+i095QLd7gMPBm4MgcgyOMJmwiEUO9FX=RiNYiQ@mail.gmail.com> |
There are conflicts between PSR-2 and PEAR, so I'm not sure about referring to them... Unless it is to clarify the specific conflicts (key one being the switch/case rules). For the "#" comment... My guess is it's there just for consistency's sake. I mean, when it comes to coding standards, the primary purpose is readability, and keeping things consistent is one way of doing that. There is no more of a "why" reason for "#" as there is for the "why" to any particular naming convention. BTW, Ken, GMail tells me "pair.com" didn't encrypt your message... "pair.com"?!? Was that a typo made during the reconfiguration of the PEAR server? The new host? Both? Does anyone know? 2016-03-17 23:18 GMT+02:00 Ken Guest <[email protected]>: > Hi everyone, > > After updating the Header Comments Block in the Coding Standards to include > mention of PHP 7, I've been looking over the PEAR Coding Standards today, > spotting a few things to update and thought to check over a few things. > > on https://pear.php.net/manual/en/standards.arrays.php correct indents for > assignments in arrays are described: > > <?php > > $some_array = array( > 'foo' => 'bar', > 'spam' => 'ham', > ); > ?> > > In my opinion. that should also include short array syntax (which is a long > overdue update I think) > > > <?php > > $some_array = [ > 'foo' => 'bar', > 'spam' => 'ham', > ]; > ?> > > > Comments.... > > Is there any specific reason why comments can't be started with an > octothorpe, i.e. > # a comment ? (If only just to answer the question "why?" asked there at > https://pear.php.net/manual/en/standards.comments.php ) > > > Tags... > On the "tags page" ( https://pear.php.net/manual/en/standards.tags.php ) > it's anbiguous whether the closing php tag needs to be included or not (if > the file contains nothing but PHP code.) > > > I'm also wondering if we want to at least refer to PSRs 0-2 at this stage? > > Thanks > > Ken > -- > http://about.me/kenguest/