Skip to content

Commit e16ca27

Browse files
committed
new rules
1 parent f7197a1 commit e16ca27

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

@@ -310,4 +313,5 @@ https://github.com/slevomat/coding-standard
310313
</properties>
311314
</rule>
312315
<rule ref="SlevomatCodingStandard.Functions.StrictCall"/>
316+
<rule ref="SlevomatCodingStandard.Commenting.AnnotationName"/>
313317
</ruleset>

0 commit comments

Comments
 (0)