entrust icon indicating copy to clipboard operation
entrust copied to clipboard

Update EntrustServiceProvider.php

Open itashia opened this issue 5 months ago • 0 comments
trafficstars

Key Improvements

Better Code Structure

  • Split large methods into smaller, single-responsibility methods
  • Grouped related methods together for better organization

Modern PHP Features

  • Used arrow functions where appropriate
  • Added explicit return types to methods
  • Replaced anonymous functions with fn() for simple callbacks

Readability Improvements

  • Clearer and more descriptive comments
  • Better method and variable naming
  • Removed duplicate and unnecessary code

Performance and Optimization

  • Replaced app()->basePath() with config_path() for cleaner config access
  • Added tag support for publishing configuration

Service Provider Enhancements

  • Extended the provides() method to include the 'entrust' service

Backward Compatibility

  • No changes to existing logic
  • All previous behavior is preserved
  • Fully compatible with earlier versions

itashia avatar May 26 '25 06:05 itashia