Add PHPDoc blocks to all functions in setup.php - #248
Merged
Merged
Conversation
This plugin's other PHP files (db_functions.php, monitor_controller.php, monitor_render.php, poller_functions.php) already have complete PHPDoc coverage from prior work. This adds PHPDoc blocks (description, @PARAM, @return, and applicable @global tags) to the 25 functions in setup.php, the one file that had none. No functional changes; documentation only. Validated with php -l.
TheWitness
requested review from
bmfmancini and
xmacan
and
a lite review from Copilot
September 24, 2026 11:03
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Five documentation corrections remain unresolved in setup.php.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 3
Open (3)
What changed in this PR
Adds PHPDoc blocks to all 25 functions in setup.php, with no intended functional changes. Syntax was validated with php -l.
Changes:
- Documents lifecycle hooks, configuration, database, and poller functions.
- Adds parameter, return, and global annotations.
- Clarifies Cacti integration behavior.
| File | Summary | Final review comments |
|---|---|---|
setup.php |
Adds PHPDoc blocks to all functions. | Five nit findings remain: clarify uninstall table coverage (4 votes), correct $page_refresh_interval’s global type (3), correct the return type documentation (3), qualify the page restriction (1), and document the actual $host_id <= 0 predicate (1). |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Correct plugin_monitor_uninstall() docblock to list the three tables it actually drops - Fix @global type/usage for $page_refresh_interval in monitor_config_settings() - Fix @return type for monitor_top_graph_refresh() (int|string, not int) - Regenerate locales/po/cacti.pot (source line references only)
…s/LC_MESSAGES/, not locales/po/)
xmacan
approved these changes
Sep 24, 2026
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.

This plugin's other PHP files (db_functions.php, monitor_controller.php, monitor_render.php, poller_functions.php) already have complete PHPDoc coverage from prior work. This adds PHPDoc blocks (description, @PARAM, @return, and applicable @global tags) to the 25 functions in setup.php, the one file that had none.
No functional changes; documentation only. Validated with php -l.