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

Copy Updated Currencies from setup.php to get_settings.php #706

Merged
merged 1 commit into from
Aug 26, 2023

Conversation

chandachewe10
Copy link
Contributor

Copy Updated Currencies from setup.php to get_settings.php.

@sonarcloud
Copy link

sonarcloud bot commented Aug 26, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@chandachewe10
Copy link
Contributor Author

There is duplicated or repetitive code within a software program with respect to constants (countries, currencies and locales).
Its occurring in setup.php and get_settings.php. For example there is $countries_array list,
$currencies_array and $locales_array list in setup.php but again these array list are manually typed repeated in
get_settings.php as we have the same constants: $countries_array list,
$currencies_array and $locales_array list.

This is becoming hard to mantain cause when you change a currency for example in setup.php you have to change all files (again in get_settings.php)
which is a little bit of work since there are some files using the currencies located in get_settings.php. Hence
for efficiency, readability, and maintainability I think these files can have a separate directory where they can be imported.

@johnnyq
Copy link
Collaborator

johnnyq commented Aug 26, 2023

@chandachewe10 Thank you for the pull request and I agree with you, maybe a file called inc_currencies.php one called inc_locales.php

@johnnyq johnnyq merged commit ac023a1 into itflow-org:master Aug 26, 2023
4 checks passed
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