Skip to content

Conversation

@itashia
Copy link

@itashia itashia commented May 26, 2025

Summary of Improvements

  • Added property and method type hints for better safety
  • Switched to Illuminate\Http\Request instead of plain $request
  • Extracted normalizePermissions() to improve method clarity
  • Used (string) casting and null coalescing to simplify checks
  • Added PHPDoc blocks and exception annotations
  • No changes in behavior — fully backward-compatible

Add type hints, improve structure and PHPDoc:

- Typed $auth property as Guard
- Added return and param types to methods
- Used Illuminate\Http\Request for clarity
- Extracted normalizePermissions method
- Used (string) cast for null safety
- Simplified null checks with ??
- Added exception annotations and PHPDoc
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.

1 participant