Skip to content

Commit dc51faf

Browse files
committed
Add PHP_CodeSniffer/SlevomatCodingStandard.TypeHints.ClassConstantTypeHint.md
1 parent af515c9 commit dc51faf

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Pattern: Missing native type hint
2+
3+
Issue: -
4+
5+
## Description
6+
7+
This rule checks for missing type hints in case they can be declared natively and also reports useless `@var` annotation (or whole documentation comment) because the type of constant is always clear.
8+
9+
Rule provides the following settings:
10+
11+
* `enableNativeTypeHint`: enforces native typehint. It's on by default if you're on PHP 8.3+
12+
13+
## Further Reading
14+
15+
* [PHP_CodeSniffer - SlevomatCodingStandard.TypeHints.ClassConstantTypeHint](https://github.com/slevomat/coding-standard/blob/master/doc/type-hints.md#slevomatcodingstandardtypehintsclassconstanttypehint-)

0 commit comments

Comments
 (0)