File tree Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Expand file tree Collapse file tree 3 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 1111 ],
1212 "require" : {
1313 "php" : " ^7.1" ,
14- "dealerdirect/phpcodesniffer-composer-installer" : " ^0.5.0 " ,
14+ "dealerdirect/phpcodesniffer-composer-installer" : " ^0.6.2 " ,
1515 "escapestudios/symfony2-coding-standard" : " ^3.6" ,
1616 "phpmd/phpmd" : " ^2.6" ,
17- "slevomat/coding-standard" : " ^5 .0" ,
17+ "slevomat/coding-standard" : " ^6 .0" ,
1818 "squizlabs/php_codesniffer" : " ^3.4"
1919 },
2020 "autoload" : {
Original file line number Diff line number Diff line change 6464
6565 <!-- Use PHP native type hints whenever possible. Use docblocks only when
6666 the use of native type hints is impossible. -->
67- <rule ref =" SlevomatCodingStandard.TypeHints.TypeHintDeclaration" >
68- <properties >
69- <property name =" allAnnotationsAreUseful" value =" true" />
70- <property name =" enableEachParameterAndReturnInspection" value =" true" />
71- </properties >
72- </rule >
67+ <rule ref =" SlevomatCodingStandard.TypeHints.ParameterTypeHint" />
68+ <rule ref =" SlevomatCodingStandard.TypeHints.PropertyTypeHint" />
69+ <rule ref =" SlevomatCodingStandard.TypeHints.ReturnTypeHint" />
7370
7471 <!-- Ensure that arguments with a default type of null are marked nullable -->
7572 <rule ref =" SlevomatCodingStandard.TypeHints.NullableTypeForNullDefaultValue" />
Original file line number Diff line number Diff line change @@ -30,9 +30,10 @@ PHPCBF CAN FIX THE 2 MARKED SNIFF VIOLATIONS AUTOMATICALLY
3030
3131FILE: tests/incorrect/type-hints.php
3232------------------------------------------------------------------------------------------------------------------------
33- FOUND 17 ERRORS AFFECTING 14 LINES
33+ FOUND 18 ERRORS AFFECTING 15 LINES
3434------------------------------------------------------------------------------------------------------------------------
35- 9 | ERROR | [x] Function doesNotNeedDocumentationComment() does not need documentation comment.
35+ 5 | ERROR | [x] Function doesNotNeedDocumentationComment() has useless @param annotation for parameter $input.
36+ 7 | ERROR | [x] Function doesNotNeedDocumentationComment() has useless @return annotation.
3637 16 | ERROR | [x] Function uselessReturnAnnotation() has useless @return annotation.
3738 23 | ERROR | [x] Function uselessParamAnnotation() has useless @param annotation for parameter $string.
3839 35 | ERROR | [x] Function uselessAnnotationsWithUsefulComment() has useless @param annotation for parameter $string.
@@ -56,7 +57,7 @@ FOUND 17 ERRORS AFFECTING 14 LINES
5657 76 | ERROR | [x] Expected "int" but found "integer" in @param annotation.
5758 78 | ERROR | [x] Expected "bool" but found "boolean" in @return annotation.
5859------------------------------------------------------------------------------------------------------------------------
59- PHPCBF CAN FIX THE 13 MARKED SNIFF VIOLATIONS AUTOMATICALLY
60+ PHPCBF CAN FIX THE 14 MARKED SNIFF VIOLATIONS AUTOMATICALLY
6061------------------------------------------------------------------------------------------------------------------------
6162
6263
You can’t perform that action at this time.
0 commit comments