Skip to content

Fix: incorrect type in lib/html_utility.php and display_help format#6887

Merged
TheWitness merged 1 commit intoCacti:developfrom
TheWitness:fix_type
Mar 24, 2026
Merged

Fix: incorrect type in lib/html_utility.php and display_help format#6887
TheWitness merged 1 commit intoCacti:developfrom
TheWitness:fix_type

Conversation

@TheWitness
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR corrects a PHP type declaration mismatch and aligns CLI helper naming/behavior, while also adjusting pre-commit hook scope.

Changes:

  • Update validate_is_regex() return type from true|string to bool|string to match supported PHP typing.
  • Rename displayVersion()/displayHelp() to display_version()/display_help() in cli/add_site.php and adjust error/help output flow.
  • Remove the files: ^app/ restriction from local pre-commit hooks so they run more broadly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
lib/html_utility.php Fixes the return type declaration/docblock for validate_is_regex() to use a supported union type.
cli/add_site.php Standardizes helper function names to snake_case and refactors how help/error output is produced.
.pre-commit-config.yaml Broadens when hooks trigger by removing the file filter.

@TheWitness TheWitness merged commit 89c5ab2 into Cacti:develop Mar 24, 2026
9 checks passed
@TheWitness TheWitness deleted the fix_type branch March 25, 2026 17:54
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