entrust icon indicating copy to clipboard operation
entrust copied to clipboard

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

itashia avatar May 26 '25 07:05 itashia