Skip to content

Commit f417fd5

Browse files
committed
Disable enableMixedTypeHint (#6)
1 parent 03694cc commit f417fd5

File tree

2 files changed

+28
-3
lines changed

2 files changed

+28
-3
lines changed

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## v0.11.x
4+
5+
### v0.11.0
6+
7+
**Breaking changes**
8+
9+
In the following rules the `enableMixedTypeHint` is disabled.
10+
See explanation and details here: https://github.com/arxeiss/php-coding-standards/pull/6
11+
12+
- SlevomatCodingStandard.TypeHints.ParameterTypeHint
13+
- SlevomatCodingStandard.TypeHints.PropertyTypeHint
14+
- SlevomatCodingStandard.TypeHints.ReturnTypeHint
15+
316
## v0.10.x
417

518
### v0.10.0

Rules/phpcs-strict.xml

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,28 @@
7676
<rule ref="SlevomatCodingStandard.TypeHints.LongTypeHints"/> <!-- Disable long type hints -->
7777
<rule ref="SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue"/> <!-- Parameter must be nullable if has null default value -->
7878
<rule ref="SlevomatCodingStandard.TypeHints.NullTypeHintOnLastPosition"/> <!-- In doc block |null must be last -->
79-
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"/> <!-- Check correct type hints -->
79+
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"> <!-- Check correct type hints -->
80+
<properties>
81+
<property name="enableMixedTypeHint" value="false"/>
82+
</properties>
83+
</rule>
8084
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint.UselessAnnotation">
8185
<severity>0</severity>
8286
</rule>
8387
<rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHintSpacing"/> <!-- Correct spacing for parameter type hints -->
84-
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"/> <!-- Check type hint for class property -->
88+
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"> <!-- Check type hint for class property -->
89+
<properties>
90+
<property name="enableMixedTypeHint" value="false"/>
91+
</properties>
92+
</rule>
8593
<rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint.UselessAnnotation">
8694
<severity>0</severity>
8795
</rule>
88-
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"/> <!-- Correct return type hint -->
96+
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"> <!-- Correct return type hint -->
97+
<properties>
98+
<property name="enableMixedTypeHint" value="false"/>
99+
</properties>
100+
</rule>
89101
<rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint.UselessAnnotation">
90102
<severity>0</severity>
91103
</rule>

0 commit comments

Comments
 (0)