I often find it helpful to align operators other than assignment operators, too. Comparison, bitwise, Boolean, arithmetic, and so on, are equally subject to operand alignment to improve readability. Which is why I said "operator" instead of "assignment operator", though my quick example only included the one type.
On Sun, Apr 22, 2018, 22:08 Greg Sherwood <[email protected]> wrote: > On Monday, 23 April 2018 14:00:11 UTC+10, Daniel Hunsaker wrote: >> >> Multiple spaces before (or, less often, after) an operator can be useful >> when attempting to align operands. >> >> <?php >> $short = 'foo'; >> >> $somethingLonger = 'bar'; >> >> >> There are other cases, but that's one of the most common. >> >>> >>> > Yes, I do this myself, which is why I normally check assignment operators > separately from others. But PSR-12 specifically defines one rule for all > operators, so I have to apply the same rule to comparison operators (for > example) that I do for assignment operators. > > -- > 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 [email protected]. > To post to this group, send email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/php-fig/c21a1db6-b7ac-4b8a-8a5c-0cd2b4e3eaed%40googlegroups.com > <https://groups.google.com/d/msgid/php-fig/c21a1db6-b7ac-4b8a-8a5c-0cd2b4e3eaed%40googlegroups.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/php-fig/CAFjuE%2Bmb%3D7OmeQ-xQvhe08ykG9ensBcgM777r9CyAL%2BpK_4yfA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
