mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-22 11:36:14 +01:00

[TASK] allow newlines for ternary operator (#338)

The previous configuration disallowed newlines in ternary operator like:

$a = $condition1 && $condition2
    ? $foo_man_this_is_too_long_what_should_i_do
    : $bar;

This seems very arbitrary since breaking on other operators is in fact
allowed.

This change allows such longer statements to be broken apart over
several lines.
This commit is contained in:
Jonas Eberle 2021-11-12 15:25:06 +01:00 committed by GitHub
parent 9c1a522ebb
commit 02e3633756
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -122,7 +122,11 @@
<rule ref="PEAR.WhiteSpace.ScopeClosingBrace"/>
<rule ref="Squiz.WhiteSpace.CastSpacing"/>
<rule ref="Squiz.WhiteSpace.LogicalOperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.OperatorSpacing"/>
<rule ref="Squiz.WhiteSpace.OperatorSpacing">
<properties>
<property name="ignoreNewlines" value="true" />
</properties>
</rule>
<rule ref="Squiz.WhiteSpace.PropertyLabelSpacing"/>
<rule ref="Squiz.WhiteSpace.SemicolonSpacing"/>
</ruleset>