On Jul 8, 2012, at 6:25 PM, Greg Sherwood wrote:
> The biggest problem with standards is always ambiguity (well, after getting people to agree to them in the first place). If the standard is not clear, I think it needs to be made clear with a minor edit. So if the outcome of this conversation is that you can do whatever spacing you want around type hints (only in multi-line declarations?) then I think PSR-2 should include a section about optional alignment, like the PEAR standard does for equals sign alignment. But if the decision is that code should follow the implied standards in the PSR-2 sample code, then maybe a message to that effect should be added and automated checkers and fixers can work with that.
Yeah, it's a tough position to be in. The way-back original long-form PSR-1 covered inter-line alignment, globals, ternaries, assignment, and lots of other things. Those ended up getting removed for various reasons; their epitaph is at the conclusion of PSR-2:
> There are many elements of style and practice intentionally omitted by this guide. These include but are not limited to:
>
> • Declaration of global variables and global constants
>
> • Declaration of functions
>
> • Operators and assignment
>
> • Inter-line alignment
>
> • Comments and documentation blocks
>
> • Class name prefixes and suffixes
>
> • Best practices
>
> Future recommendations MAY revise and extend this guide to address those or other elements of style and practice.
In my opinion, Adding these things on should probably not be an edit to PSR-2, but the subject of a separate recommendations extending from PSR-2.
-- pmj