1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-22 05:41:20 +01:00

Enforce null-coalesce operators

This commit is contained in:
Bruce Weirdan 2022-01-05 13:21:30 +02:00
parent dd09450092
commit dfb14cbe87
No known key found for this signature in database
GPG Key ID: CFC3AAB181751B0D

View File

@ -190,6 +190,10 @@
</properties>
</rule>
<!--
Requires using a underscore separator for long numbers.
https://github.com/slevomat/coding-standard/#slevomatcodingstandardnumbersrequirenumericliteralseparator
-->
<rule ref="SlevomatCodingStandard.Numbers.RequireNumericLiteralSeparator">
<properties>
<property name="enable" value="true"/>
@ -197,4 +201,19 @@
</properties>
</rule>
<!--
Requires use of null coalesce operator when possible.
https://github.com/slevomat/coding-standard/#slevomatcodingstandardcontrolstructuresrequirenullcoalesceoperator-
-->
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceOperator" />
<!--
Requires use of null coalesce equal operator when possible.
https://github.com/slevomat/coding-standard/#slevomatcodingstandardcontrolstructuresrequirenullcoalesceequaloperator-
-->
<rule ref="SlevomatCodingStandard.ControlStructures.RequireNullCoalesceEqualOperator">
<properties>
<property name="enable" value="true"/>
</properties>
</rule>
</ruleset>