Remove code repetition
Posted: Thu May 02, 2019 7:55 am
Hi guys,
I know this subject has been discussed before, but I would like to effectively contribute to the OC have less repetition and consequently less line of code, obviously without losing the simplicity and without causing errors.
I raised a discussion in Github on this topic. With only two simple classes, 340 lines of code were saved in the controller product, as well as eliminating repetition: https://github.com/opencart/opencart/pull/7398
Maybe the classes are not the most elegant, but the intention is to discuss this topic and do something effective to correct this problem (in my opinion).
I know this subject has been discussed before, but I would like to effectively contribute to the OC have less repetition and consequently less line of code, obviously without losing the simplicity and without causing errors.
I raised a discussion in Github on this topic. With only two simple classes, 340 lines of code were saved in the controller product, as well as eliminating repetition: https://github.com/opencart/opencart/pull/7398
Maybe the classes are not the most elegant, but the intention is to discuss this topic and do something effective to correct this problem (in my opinion).