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

Refactor AbstractSchema::getDataType() #786

Merged
merged 3 commits into from
Nov 26, 2023
Merged

Refactor AbstractSchema::getDataType() #786

merged 3 commits into from
Nov 26, 2023

Conversation

Tigrov
Copy link
Member

@Tigrov Tigrov commented Nov 26, 2023

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

Copy link

what-the-diff bot commented Nov 26, 2023

PR Summary

  • Introduction of a Changelog Entry
    A new record has been added to the changelog documentation, detailing the modification of a critical programming function, specifically AbstractSchema::getDataType() (linked to improvement request Refactor AbstractSchema::getDataType() #786).

  • Optimization of the getDataType() Function
    The getDataType() function within the AbstractSchema.php file has been restructured to utilize a match expression which is a simplified and efficient way to handle multiple conditions. This replaces the prior method of using an array mapping, which results in cleaner and easy-to-maintain code.

  • Removal of Redundant Case for PHP_TYPE_STRING
    A specific case for handling PHP_TYPE_STRING within the getDataType() function has been removed. This is due to the function's redesign, which now effectively manages such scenarios using a default case. This declutters the code and eliminates redundancy.

Copy link

codecov bot commented Nov 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (f655cb7) 98.88% compared to head (dbb35ec) 99.64%.

❗ Current head dbb35ec differs from pull request most recent head 5854fb7. Consider uploading reports for the commit 5854fb7 to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #786      +/-   ##
============================================
+ Coverage     98.88%   99.64%   +0.75%     
- Complexity     1271     1272       +1     
============================================
  Files            63       63              
  Lines          3060     3059       -1     
============================================
+ Hits           3026     3048      +22     
+ Misses           34       11      -23     

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

@vjik vjik merged commit f06cf26 into master Nov 26, 2023
84 of 87 checks passed
@vjik vjik deleted the refactor-getDataType branch November 26, 2023 17:52
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.

2 participants