Opened 8 weeks ago
Closed 8 weeks ago
#65901 closed defect (bug) (fixed)
PHPDoc comments and types missing in Translation_Entry
| Reported by: | pedromendonca | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 7.2 |
| Component: | I18N | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: | docs, coding-standards |
Description
Function and property declarations are missing PHPDoc comment, types declaration and @return tags at many places of src/wp-includes/pomo/entry.php.
Proposed patch added.
Change History (5)
This ticket was mentioned in PR #13126 on WordPress/wordpress-develop by @pedromendonca.
8 weeks ago
#1
This ticket was mentioned in PR #13128 on WordPress/wordpress-develop by @wprashed.
8 weeks ago
#2
## Trac Ticket
https://core.trac.wordpress.org/ticket/65901
## Description
Adds missing PHPDoc blocks and type declarations to the Translation_Entry class in src/wp-includes/pomo/entry.php.
### Changes
Property docblocks added for all previously undocumented properties:
$singular—string|null$plural—string|null$translations—(string|null)[]$context—string|null$translator_comments—string$extracted_comments—string$references—string[]$flags—string[]
Constructor docblock improved:
- Added
@since 2.8.0tag - Added summary line (
Constructor.) - Updated parameter description to
Optional. Array of arguments. Default empty array. - Updated
@typeannotations with precise types (string[]instead ofarray,(string|null)[]for translations)
Other improvements:
- Added missing
@paramtag to the deprecated PHP4 constructorTranslation_Entry() - Added
@return voidtomerge_with() - Fixed period at end of file-level docblock description
Fixes #65901.
@mukesh27 commented on PR #13128:
8 weeks ago
#3
Duplicate of #13126.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Add missing Docblocks and declare types of
Translation_Entryproperties.Trac ticket: 65901
## Use of AI Tools
AI assistance: Yes
Tool: Claude
Model: Opus 5
Used for: Initial assessment and code skeleton; final implementation was reviewed and edited by me.