christoph-schaeffer / dhl-business-shipping

An unofficial library for the DHL business shipping soap API (Version 3.3) and the dhl shipment tracking rest API written in PHP.
MIT License
29 stars 8 forks source link

[PROPOSAL] LABEL_FORMAT relocation #22

Closed xerc closed 1 year ago

christoph-schaeffer commented 2 years ago

Thank you for your contribution. However, i am not really sure if this would be better or not. I can see that it might be useful to have a central class where all constants are. We would need to move all constants there though... There are a lot of different constants scattered in several classes. I think a separate class for all and only constants might be an even better idea.

For example to have a class in the root directory, which is called "constants" or something like that. Or a new directory named constants with several classes in it. For example label format for all label format constants. What do you think about this approach?

On the other hand the code style so far was to keep the constants where the actual property is. Which would also make sense.

I would really like to get more opinions on this before we start changing things.

xerc commented 2 years ago

one file per const "block" would make sense .. Label ; https://github.com/christoph-schaeffer/dhl-business-shipping/pull/22/files#diff-6377e5be654350270eb66c5cae53faa10999a0815138a595f6f6cd1001c11475 Service ; https://handbuch.mauve.de/DHL-Service#Unterst.C3.BCtzte_DHL-Services Options ; https://handbuch.mauve.de/DHL-Service#Versandart-Optionen Delivery ; ShipmentHandling{} Export (?) [..]

christoph-schaeffer commented 1 year ago

im planning to do some refactoring for the next version and take your suggestions into consideration there. 👍