Skip to content

Commit ce21798

Browse files
committed
docs: Update style recommendations
1 parent bc62d40 commit ce21798

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

contributing/pull_request.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ class/interface/trait, method, and variable.
9898

9999
Do not add PHPDoc comments that are superficial, duplicated, or stating the obvious.
100100

101+
It is not recommended to reuse comments if the parent class or interface already contains a description of the child element.
102+
103+
You can re-add a comment in a child element if it has a more precise type - i.e change `int|string` to `string`.
104+
101105
See the following for more information.
102106

103107
- [PHPDoc reference](https://docs.phpdoc.org/3.0/guide/references/phpdoc/index.html#phpdoc-reference)

contributing/styleguide.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ of the classes they declare.
241241
- */
242242
public function analyse(string $data): void {};
243243
```
244+
- SHOULD NOT duplicate comments from the parent class or interface.
244245

245246
### PHPUnit Assertions
246247

0 commit comments

Comments
 (0)