Skip to content

Use static callables with type hints#713

Open
fadrian06 wants to merge 1 commit into
masterfrom
use-best-practices-in-index.php
Open

Use static callables with type hints#713
fadrian06 wants to merge 1 commit into
masterfrom
use-best-practices-in-index.php

Conversation

@fadrian06

Copy link
Copy Markdown
Contributor

This pull request makes a small change to the root route definition in index.php, updating the route handler to use a static anonymous function for improved performance and clarity.

Copilot AI review requested due to automatic review settings July 11, 2026 17:47

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.

Pull request overview

This pull request updates the example root (/) route handler in index.php to use a static anonymous function with an explicit void return type, aligning the handler with clearer intent (no closure binding, no return value) while keeping behavior the same.

Changes:

  • Converted the / route handler to a static anonymous function.
  • Added an explicit : void return type to the route handler.

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.

2 participants