Skip to content

Add PHPDoc blocks to all functions in setup.php - #248

Merged
TheWitness merged 3 commits into
developfrom
docs/phpdoc-blocks
Sep 24, 2026
Merged

TheWitness merged 3 commits into
developfrom
docs/phpdoc-blocks

Conversation

@TheWitness

Copy link
Copy Markdown
Member

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.

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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Low severity

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.

Comment thread setup.php Outdated
Comment thread setup.php Outdated
Comment thread setup.php Outdated
- 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)
@TheWitness
TheWitness merged commit 86480ea into develop Sep 24, 2026
5 checks passed
@TheWitness
TheWitness deleted the docs/phpdoc-blocks branch September 24, 2026 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants