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

Make SimpleAssignmentsStorage::$assignments protected #219

Merged
merged 1 commit into from
Dec 12, 2023

Conversation

arogachev
Copy link
Contributor

Q A
Is bugfix?
New feature?
Breaks BC?

@arogachev arogachev merged commit a5fe59e into master Dec 12, 2023
16 of 20 checks passed
@arogachev arogachev deleted the assignments-protected branch December 12, 2023 13:33
@arogachev arogachev self-assigned this Dec 12, 2023
@arogachev arogachev added the type:task Task label Dec 12, 2023
Copy link

what-the-diff bot commented Dec 12, 2023

PR Summary

  • Enhanced Type Checking in Manager.php
    The code now enforces more rigorous type checking to avoid potential errors. Specifically, if the 'parent' object is a 'Permission' type and the 'child' object is a 'Role' type, certain exceptions would occur previously. With the new change, the system conducts an 'instance check'. Only if the 'parent' is a 'Permission' instance and the 'child' a 'Role' instance, the system proceeds; otherwise, a runtime error is flagged to alert the user of a problem.

  • Visibility Modification in SimpleAssignmentsStorage.php
    In an effort to enhance the flexibility of our code, we have changed the visibility status of the 'assignments' attribute. It was previously marked as 'private', restricting its accessibility outside the class. We have now made it 'protected', which allows it to be accessed not only within the class, but also in any derived classes. This change promotes code modularity and reusability while maintaining a reasonable level of data protection and encapsulation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant