Skip to content

Commit ae13c11

Browse files
mathrocMathieu Rochette
authored and
Mathieu Rochette
committed
Update deprecated UnionTypeHintFormat
1 parent 1d6b65e commit ae13c11

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

Proton/ruleset.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,9 +192,9 @@
192192
<exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/>
193193
</rule>
194194
<!-- Define unions style -->
195-
<rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat">
195+
<rule ref="SlevomatCodingStandard.TypeHints.DNFTypeHintFormat">
196196
<properties>
197-
<property name="withSpaces" value="no" />
197+
<property name="withSpacesAroundOperators" value="no" />
198198
<property name="nullPosition" value="last" />
199199
</properties>
200200
</rule>
@@ -238,7 +238,6 @@
238238
<property name="linesCountAfterDeclare" value="1"/>
239239
</properties>
240240
</rule>
241-
<rule ref="SlevomatCodingStandard.TypeHints.UnionTypeHintFormat"/>
242241

243242
<rule ref="SlevomatCodingStandard.Exceptions.RequireNonCapturingCatch"/>
244243

tests/expected_csv.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ Line,Column,Type,Source
5959
63,62,error,Squiz.Functions.MultiLineFunctionDeclaration.BraceOnSameLine
6060
6,18,error,PSR12.Files.FileHeader.SpacingInsideBlock
6161
6,1,error,SlevomatCodingStandard.Namespaces.UnusedUses.UnusedUse
62-
58,60,error,SlevomatCodingStandard.TypeHints.UnionTypeHintFormat.NullTypeHintNotOnLastPosition
63-
58,32,error,SlevomatCodingStandard.TypeHints.UnionTypeHintFormat.NullTypeHintNotOnLastPosition
62+
58,60,error,SlevomatCodingStandard.TypeHints.DNFTypeHintFormat.NullTypeHintNotOnLastPosition
63+
58,32,error,SlevomatCodingStandard.TypeHints.DNFTypeHintFormat.NullTypeHintNotOnLastPosition
6464
53,54,error,SlevomatCodingStandard.TypeHints.ReturnTypeHintSpacing.WhitespaceBeforeColon
65-
53,54,error,SlevomatCodingStandard.TypeHints.UnionTypeHintFormat.DisallowedWhitespace
65+
53,54,error,SlevomatCodingStandard.TypeHints.DNFTypeHintFormat.DisallowedWhitespaceAroundOperator
6666
53,52,error,PSR12.Functions.ReturnTypeDeclaration.SpaceBeforeColon
6767
53,20,error,PSR1.Methods.CamelCapsMethodName.NotCamelCaps
6868
53,20,error,SlevomatCodingStandard.TypeHints.ParameterTypeHint.MissingAnyTypeHint

0 commit comments

Comments
 (0)