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

Change property Schema::$typeMap to constant Schema::TYPE_MAP #282

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Nov 16, 2023

The change reduces size of cache.

Q A
Is bugfix?
New feature?
Breaks BC?
Fixed issues -

Copy link

codecov bot commented Nov 16, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (e3d9164) 98.42% compared to head (ed6f03e) 98.42%.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #282   +/-   ##
=========================================
  Coverage     98.42%   98.42%           
  Complexity      330      330           
=========================================
  Files            19       19           
  Lines          1016     1016           
=========================================
  Hits           1000     1000           
  Misses           16       16           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

what-the-diff bot commented Nov 16, 2023

PR Summary

  • Adjustment to the $typeMap variable
    Firstly, we converted the $typeMap variable from a normal property (which can be changed) to a constant. For non-technical people, this means that it is always the same, it never changes. This makes it more secure and predictable. We used the private const TYPE_MAP term which, without getting too techy, is just a safer way to keep this information.
  • Update in the loadColumnSchema method usage
    Next, we've also made changes to something we call the loadColumnSchema method. Methods are kinds of procedures or functions within our program. In the loadColumnSchema method, we replaced the way $this->typeMap was used with self::TYPE_MAP. This makes the method more harmonized with the change we made above, ensuring things work consistently across the system.

@Tigrov Tigrov added the status:code review The pull request needs review. label Nov 16, 2023
@vjik vjik merged commit fd45a0b into master Nov 16, 2023
21 checks passed
@vjik vjik deleted the change-typemap-to-constant branch November 16, 2023 06:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:code review The pull request needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants