Repository navigation
PHPCS: docblocks for every class, method and template - #240
Merged
Merged
Conversation
bordoni
force-pushed
the
docs/phpcs-docblocks
branch
4 times, most recently
from
October 17, 2026 23:17
a645405 to
6a1a3be
Compare
bordoni
force-pushed
the
docs/phpcs-docblocks
branch
from
October 17, 2026 23:20
6a1a3be to
8b30d01
Compare
Mechanical pass over the 189 InvalidEndChar findings, plus three comments rewritten so they say what the code does (the Controller endpoint example, the Lorem Picsum URL example and WP_Term::taxonomy()).
File, class, property and method docblocks for src/FakerPress/Module, written from the code. @inheritdoc on methods with parameters is replaced by full docblocks; @SInCE tags on those reuse the versions already on Interface_Module. Interface_Module::fetch() now documents its real array return and get() its object|null return.
File docblocks for every admin file, class summaries that name the right view (three said 'Class Post_View'), full docblocks for the Admin hook callbacks, Menu param and return descriptions, and the User/Term/Comment format_link() docs now describe users, terms and comments instead of posts.
Templates that start with markup get a leading <?php /** ... */ ?> block; the newline after ?> is swallowed by PHP, so the output is unchanged.
File, class and method docblocks for src/FakerPress/Provider, written from the code. Corrects docs that described other behaviour: WP_Meta::meta_parse_qty() parameters, HTML::html_element_img()/get_img_src() return types and the 20% image reuse rate, and meta_type_lexify() (it calls bothify()).
get_request_var() now documents the real lookup order ($_GET, then $_POST, then $_REQUEST) and points @see at get_in_any(); callback() no longer documents a parameter it does not have.
File, class, property and method docblocks for Plugin, Template, Utils, Assets, Utils\Assets, Hooks, Dates, Ajax and the deprecated Field class. Template::get() said 'Sets'; Assets carried a stray StellarWP\Jobvite package tag; Field's two section banners are gone because PHPCS read them as method docblocks.
bordoni
force-pushed
the
docs/phpcs-docblocks
branch
from
October 17, 2026 23:22
8b30d01 to
4128040
Compare
PHPCS warns that HTML-only files have no PHP code when short_open_tag is off, as on GitHub's runners. The seven empty placeholders and container/end.php get a file docblock; container/end.php still outputs </tr>.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Docblocks only: file, class and method docblocks to the WordPress standard, docblocks that contradicted the code corrected, and inline comments as full sentences. After this,
vendor/bin/phpcsreports 0 errors and 0 warnings (722 errors and 146 warnings onmain).New docblocks carry
@since TBD; #243 sets the ones added in this release to 0.10.0.Stacked on #239.