I'll chime in and say that neither of proposed changes appeal to me.

On Sat, Feb 4, 2017, 17:06 Alessandro Pellizzari <a...@amiran.it> wrote:

> On Sat, 4 Feb 2017 11:41:39 -0800 (PST)
> "Ryan R." <ryan.rajko...@gmail.com> wrote:
>
> > Hello,
> > I'd like to propose a change to the PSR-2 rule concerning the
> > presence of one (and only one) empty line after opening braces for
> > conditional statements.
> >
> > Indeed I believe allowing (enforcing ?) a single empty line at the
> > beginning of the conditional statement would enhance the readability
> > of the code, especially when multiple conditional statements are
> > nested.
>
> I agree in allowing (not enforcing) blank lines in conditionals.
>
> Personally I prefer a blank line before the }else{ part:
>
> if ('string' === $dummy) {
>     if ('values' === $mergedOptions['some_default']) {
>         return substr($dummy, 0, 5);
>
>     } else {
>         $dummy = trim($dummy);
>     }
>
>     return ucwords($dummy);
> }
>
> In this case it is probably not so evident, but I find it more readable
> when there is a block of 5-6 lines.
>
> I don't think a PSR-2 change is possible, but maybe it could be
> included in PSR-12?
>
> Bye.
>
> --
> You received this message because you are subscribed to the Google Groups
> "PHP Framework Interoperability Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to php-fig+unsubscr...@googlegroups.com.
> To post to this group, send email to php-fig@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/php-fig/20170204230621.5fa888f5%40namek.
> For more options, visit https://groups.google.com/d/optout.
>
-- 

Woody Gilk
http://about.me/shadowhand

-- 
You received this message because you are subscribed to the Google Groups "PHP 
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/php-fig/CAGOJM6J4y5TDUx6ogpD0AGL4FOY9PyBdwYFs8RoLQUy2jUQJUA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to