Skip to content
This repository was archived by the owner on Sep 19, 2023. It is now read-only.

Commit cb4d289

Browse files
committed
Add parameter comments to excludes. Add instructions how to generate short descriptions in PhpDocs
1 parent e2c3922 commit cb4d289

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,18 @@ Installation instructions:
55
1. Clone repository on your drive
66
2. Run `composer install`
77
2. Run: `chmod +x phpcsx phpmd`
8-
3. Configure your PhpStorm to use both scripts
8+
3. Configure your PhpStorm to use both scripts
9+
4. (Optional) Open PhpStorm Settings -> Editor -> File and Code Templates [Includes] -> Php Function Doc Comment
10+
And replace content with:
11+
```java
12+
#set( $name = ${NAME} )
13+
/**
14+
* $name.substring(0,1).toUpperCase()$name.substring(1).replaceAll("([A-Z])", " $1")
15+
*
16+
${PARAM_DOC}
17+
#if (${TYPE_HINT} != "void") * @return ${TYPE_HINT}
18+
#end
19+
${THROWS_DOC}
20+
*/
21+
```
22+
This will generate a **short description** for functions and methods with Function / Method name.

justcoded/JustcodedPSR2/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<exclude name="Squiz.Commenting.FunctionComment.ParamCommentFullStop"/>
2727
<exclude name="Squiz.Commenting.FunctionComment.SpacingAfterParamType"/>
2828
<exclude name="Generic.Commenting.DocComment"/>
29+
<exclude name="Squiz.Commenting.FunctionComment.MissingParamComment"/>
2930
</rule>
3031
<rule ref="JustcodedPSR2.Commenting.DocComment" />
3132
</ruleset>

0 commit comments

Comments
 (0)