Skip to content

docs: add PHPDoc blocks to all function definitions - #25

Merged
TheWitness merged 2 commits into
mainfrom
docs/phpdoc-blocks
Sep 24, 2026
Merged

TheWitness merged 2 commits into
mainfrom
docs/phpdoc-blocks

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

Adds standard PHPDoc blocks to every function definition in quicktree_security.php, ui_helpers.php, and setup.php (17 functions total, no functional changes):

  • A description of the function's purpose and a note on how/where it's invoked (dispatcher entry point, plugin hook, etc.)
  • @param with type, name, and description for each parameter
  • @return with type and description
  • @global tags for functions that depend on global state, noting what each global is used for

This is documentation-only; no logic was changed. quicktree.php declares no functions and is unchanged.

Test plan

  • php -l on all changed files
  • Verified function count matches added-docblock count (1/1, 2/2, 14/14) in each file

Documents all 17 functions across quicktree_security.php, ui_helpers.php,
and setup.php with standard PHPDoc: a description of the function's
purpose and where/how it's invoked, @param/@return with types, and
@global tags for functions that depend on global state. No functional
changes. quicktree.php declares no functions and is unchanged.

Copilot AI left a comment

Copy link
Copy Markdown

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

Unresolved PHPDoc accuracy issues remain in three documented functions.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 Low severity

Open (1)
What changed in this PR

Adds PHPDoc blocks to all 17 functions across three PHP files without changing runtime behavior.

Changes:

  • Documents purposes, parameters, return values, invocation contexts, and globals.
  • Covers UI helpers, plugin setup/lifecycle functions, and location normalization.
File Description
ui_helpers.php Documents form helper functions.
setup.php Documents lifecycle, hooks, navigation, setup, and upgrade functions.
quicktree_security.php Documents location normalization.

💡 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
- setup.php: fix quicktree_page_location()'s invocation context - it
  is only called from quicktree_show_tab() in this file; quicktree.php
  uses the unrelated quicktree_normalize_location() instead.
- Regenerate locales/po/cacti.pot.
- Add .gitignore (this repo had none) covering locales/po/*.mo and
  locales/LC_MESSAGES/*.mo so future compiled translation files aren't
  committed to pull requests.
@TheWitness
TheWitness merged commit 98504fe into main Sep 24, 2026
5 checks passed
@TheWitness
TheWitness deleted the docs/phpdoc-blocks branch September 25, 2026 07:03
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