PEAR Coding Standards
[email protected] (Ken Guest) Thu, 17 Mar 2016 21:18:17 +0000
| Newsgroups | php.pear.dev |
|---|---|
| Message-ID | <CAKcc2m_uYx8+w1-eZXzxJCJ9ZZNpqNpmw08+ereS7THeSwFYRQ@mail.gmail.com> |
--001a11496c544a12aa052e452baf
Content-Type: text/plain; charset=UTF-8
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/
--001a11496c544a12aa052e452baf--