Thanks! Pretty much what I'm talking about. But why it's not included into general standard (BTW I do not like formatting proposed there :) )?
среда, 21 июня 2017 г., 9:29:24 UTC+1 пользователь Max Mustermann написал: > > Hey, > > Yes, very nice appendix out there: > > > https://github.com/php-fig-rectified/fig-rectified-standards/blob/master/PSR-2-R-coding-style-guide-additions.md#multi-line-declarationconditionconcatenation > > > Pretty much the obvious solution if you consistently continue PSR. > > Regards > Sven > > Am 2017-06-21 10:11, schrieb Sergey Karavay: > > Hey guys! > > > > I'd looked through all existing coding-style standards (PSR-1, PSR-2, > > PSR-12) and actually failed to find any suggestions about formatting > > of long conditionals. We have standards for long argument lists, long > > "implements" lists, long "use" lists, but what about long conditions? > > > > For example: > > > > if (($someLongVariable && $anotherLongVariable) || > > $moreLongVariablesHere || $this->andEvenSomeLongMethodCall()) { > > //body here > > } > > > > Can be formatted like this: > > > > if ( > > ($someLongVariable && $anotherLongVariable) > > || > > $moreLongVariablesHere > > || > > $this->andEvenSomeLongMethodCall() > > ) { > > > > //body here > > } > > > > or like this: > > > > if ( > > ($someLongVariable && $anotherLongVariable) || > > $moreLongVariablesHere || > > $this->andEvenSomeLongMethodCall() > > ) { > > > > //body here > > } > > > > or in some other way. > > > > Do we have a standard for this somewhere? > > > > Thanks. > > > > -- > > 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+u...@googlegroups.com <javascript:>. > > To post to this group, send email to php...@googlegroups.com > <javascript:>. > > To view this discussion on the web visit > > > > > https://groups.google.com/d/msgid/php-fig/3f60c18b-f847-4d89-a972-a70290a165e6%40googlegroups.com > > > [1]. > > For more options, visit https://groups.google.com/d/optout [2]. > > > > > > Links: > > ------ > > [1] > > > > > https://groups.google.com/d/msgid/php-fig/3f60c18b-f847-4d89-a972-a70290a165e6%40googlegroups.com?utm_medium=email&utm_source=footer > > > [2] 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 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/7228d093-88ae-4576-ad2a-ad179743e4cd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.