Skip to content

Commit de701ac

Browse files
committed
new rules
1 parent 9da3f48 commit de701ac

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

preset-fixer/common/Nette.php

+6
Original file line numberDiff line numberDiff line change
@@ -209,4 +209,10 @@
209209

210210
// Constructor having promoted properties must have them in separate lines
211211
PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer::name() => true,
212+
213+
// Use the Elvis operator ?: where possible.
214+
'ternary_to_elvis_operator' => true,
215+
216+
// Adds or removes ? before single type declarations or |null at the end of union types when parameters have a default null value.
217+
'nullable_type_declaration_for_default_null_value' => true,
212218
];

preset-sniffer/Nette.xml

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,9 @@ https://github.com/slevomat/coding-standard
7474
<!-- Checks that there is a certain number of blank lines between constants. -->
7575
<rule ref="SlevomatCodingStandard.Classes.ConstantSpacing"/>
7676

77+
<rule ref="SlevomatCodingStandard.Functions.NamedArgumentSpacing"/>
78+
79+
7780

7881
<!-- CONTROL STRUCTURES -->
7982

@@ -324,4 +327,5 @@ https://github.com/slevomat/coding-standard
324327
</properties>
325328
</rule>
326329
<rule ref="SlevomatCodingStandard.Functions.StrictCall"/>
330+
<rule ref="SlevomatCodingStandard.Commenting.AnnotationName"/>
327331
</ruleset>

0 commit comments

Comments
 (0)