Skip to content

Commit

Permalink
new rules
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed Feb 2, 2025
1 parent 1f90878 commit 6d08865
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions preset-fixer/common/Nette.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,4 +209,10 @@

// Constructor having promoted properties must have them in separate lines
PhpCsFixerCustomFixers\Fixer\MultilinePromotedPropertiesFixer::name() => true,

// Use the Elvis operator ?: where possible.
'ternary_to_elvis_operator' => true,

// Adds or removes ? before single type declarations or |null at the end of union types when parameters have a default null value.
'nullable_type_declaration_for_default_null_value' => true,
];
4 changes: 4 additions & 0 deletions preset-sniffer/Nette.xml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ https://github.com/slevomat/coding-standard
<!-- Checks that there is a certain number of blank lines between constants. -->
<rule ref="SlevomatCodingStandard.Classes.ConstantSpacing"/>

<rule ref="SlevomatCodingStandard.Functions.NamedArgumentSpacing"/>



<!-- CONTROL STRUCTURES -->

Expand Down Expand Up @@ -324,4 +327,5 @@ https://github.com/slevomat/coding-standard
</properties>
</rule>
<rule ref="SlevomatCodingStandard.Functions.StrictCall"/>
<rule ref="SlevomatCodingStandard.Commenting.AnnotationName"/>
</ruleset>

0 comments on commit 6d08865

Please sign in to comment.