Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes and improvements #310

Merged
merged 4 commits into from
Jan 12, 2024
Merged

fixes and improvements #310

merged 4 commits into from
Jan 12, 2024

Conversation

bezhanSalleh
Copy link
Owner

Fixes #304 & some performance improvments.

Copy link

what-the-diff bot commented Jan 12, 2024

PR Summary

  • Code Optimizations in MakeShieldGenerateCommand.php
    In this pull request, repeated code patterns have been removed and replaced by utilizing specific keys of associative arrays for value extraction. These changes enhance the readability and maintainability of the code alongside reducing possible coding mistakes.

  • Updates and Improvement in FilamentShield.php
    In FilamentShield.php, a method has been added which retrieves the widget class from a WidgetConfiguration object. Various methods have been updated significantly to use specific keys from associative arrays, improving the efficiency of code. Moreover, redundant methods like transformClassString and hasHeadingForShield have been removed. For generating the default permission identifier, instead of after, afterLast is used, improving the generation logic.

  • Refactor and Enhancements in RoleResource.php
    In RoleResource.php, enhancements are made to use the permission key of an array instead of the entire value, leading to more efficient code. Also, instead of inline code, methods from an external resource (getCheckBoxListComponentForResource) are utilized, increasing modularity and reusability of the code base.

@bezhanSalleh bezhanSalleh merged commit d444f1f into 3.x Jan 12, 2024
5 checks passed
@bezhanSalleh bezhanSalleh deleted the fix/widget-configuration-instance branch January 12, 2024 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant