Skip to content

Conversation

@shadowhand
Copy link
Collaborator

Refs #310

@shadowhand shadowhand requested a review from Copilot December 3, 2025 13:24
Copy link

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 refactors the isStatic and notStatic assertion methods to accept broader callable types beyond just Closure, improving flexibility. The changes update parameter and return types, rename parameters from $closure to $callable for clarity, and introduce a helper method callableToClosure() to handle the conversion.

Key changes:

  • Broadened isStatic/notStatic to accept Closure|callable instead of just Closure
  • Added callableToClosure() helper method to convert callables to closures or return callable strings
  • Updated all related wrapper methods in Mixin.php to reflect the new parameter names and types

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/Assert.php Refactored isStatic/notStatic methods to accept broader callable types and added callableToClosure() helper
src/Mixin.php Updated wrapper methods to use new $callable parameter name and updated type annotations
tests/static-analysis/assert-isStatic.php Updated test function to match new signature with broader types
tests/static-analysis/assert-notStatic.php Updated test function to match new signature with broader types
CHANGELOG.md Added entry for new isStatic and notStatic assertions

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@shadowhand shadowhand force-pushed the chore/static-cleanup branch from d81ab36 to 8951ce3 Compare December 3, 2025 13:26
@shadowhand shadowhand force-pushed the chore/static-cleanup branch from 8951ce3 to a9c6619 Compare December 3, 2025 13:27
@shadowhand shadowhand merged commit 68b79e9 into master Dec 3, 2025
9 checks passed
@shadowhand shadowhand deleted the chore/static-cleanup branch December 3, 2025 13:30
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