File tree Expand file tree Collapse file tree 1 file changed +29
-4
lines changed
Expand file tree Collapse file tree 1 file changed +29
-4
lines changed Original file line number Diff line number Diff line change @@ -48,12 +48,13 @@ Later more additional rules can be added. See *phpcs.example.xml*.
4848
4949## Included sniffs
5050
51- See [ SniffList] ( SniffsList.md ) <br >
52- There is no really good documentation for sniffs. I wrote one sentence explanation for each used sniff into XML files.
51+ See [ SniffList] ( SniffsList.md ) , I wrote one sentence explanation for each used sniff into XML files.
5352
54- ### More suggested
53+ Also Slevomat rules have some comments about in their repository Readme https://github.com/slevomat/coding-standard
5554
56- #### Check that Namespace matches file structure
55+ ## More suggested
56+
57+ ## Check that Namespace matches file structure
5758This is used from my own blog in Laravel, where main folder ` app ` is ` BlogApp ` namespace.
5859
5960``` xml
@@ -65,3 +66,27 @@ This is used from my own blog in Laravel, where main folder `app` is `BlogApp` n
6566 </properties >
6667</rule >
6768```
69+
70+ ## Since v0.11.0 ` mixed ` typehint is not required
71+
72+ Explanation can be found here https://github.com/arxeiss/php-coding-standards/pull/6
73+
74+ If you want to force linter to use ` mixed ` typehint, you can enable by adding this into phpcs.xml file.
75+
76+ ``` xml
77+ <rule ref =" SlevomatCodingStandard.TypeHints.ParameterTypeHint" > <!-- Check correct type hints -->
78+ <properties >
79+ <property name =" enableMixedTypeHint" value =" true" />
80+ </properties >
81+ </rule >
82+ <rule ref =" SlevomatCodingStandard.TypeHints.PropertyTypeHint" > <!-- Check type hint for class property -->
83+ <properties >
84+ <property name =" enableMixedTypeHint" value =" true" />
85+ </properties >
86+ </rule >
87+ <rule ref =" SlevomatCodingStandard.TypeHints.ReturnTypeHint" > <!-- Correct return type hint -->
88+ <properties >
89+ <property name =" enableMixedTypeHint" value =" true" />
90+ </properties >
91+ </rule >
92+ ```
You can’t perform that action at this time.
0 commit comments