Conversation
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Code Review
This pull request aims to fix newly reported PHPStan issues by adding or correcting PHPDoc annotations across several files. The changes are generally good and improve code clarity for static analysis. I've found one area where the new annotation seems inconsistent with the implementation and have suggested a correction.
| abstract protected function filter_item_list( $items, $args ); | ||
|
|
||
| /** | ||
| * @return array<string, array{slug: string, name: string, update: string, recently_active?: bool, status: string, version: string}> |
There was a problem hiding this comment.
The keys in this PHPDoc annotation don't seem to match what the implementing methods (Plugin_Command::get_all_items and Theme_Command::get_all_items) return. Those methods return an array with a name key for the slug and a title key for the human-readable name. This annotation uses slug and name respectively, which is inconsistent. To accurately reflect the returned data structure and avoid confusion, it would be better to use name and title in the annotation.
* @return array<string, array{name: string, title: string, update: string, recently_active?: bool, status: string, version: string}>
No description provided.