Update Entrust.php
Open
itashia
opened this issue 5 months ago
•
0 comments
Improvements Summary
- Added precise type hints for parameters and return types (e.g.
?Authenticatable, void)
- Used modern PHP features like nullsafe operator (
?->) and arrow functions
- Reduced code duplication with helper methods (
registerRouteFilter, generateFilterName)
- Centralized access handling in
handleRouteAccessCheck
- Improved readability with clearer comments, formatting, and naming
- Maintained full backward compatibility with no behavior changes or new dependencies