refactor(phpstan): enhance type enforcement and error handling in shipping rules
This commit enhances the type enforcement in the Shipping module by explicitly checking for method existence before calls on variable types. In addition, it enforces argument type checks for several function and method declarations to avoid type-related errors. Moreover, the error handling in different functions has been improved by catching potential exceptions and logging them for debug purposes. The commit also optimizes a PHP sorting function by leveraging the spaceship operator instead of using conventional comparisons. Related: #55
Übergeordneter
e5ed940a
Branches next-3.x
No related tags found
- ajax/backend/rules/getRules.php 8 Ergänzungen, 13 Löschungenajax/backend/rules/getRules.php
- src/QUI/ERP/Shipping/EventHandler.php 40 Ergänzungen, 12 Löschungensrc/QUI/ERP/Shipping/EventHandler.php
- src/QUI/ERP/Shipping/Methods/Digital/ShippingType.php 0 Ergänzungen, 1 Löschungsrc/QUI/ERP/Shipping/Methods/Digital/ShippingType.php
- src/QUI/ERP/Shipping/Methods/Standard/ShippingType.php 0 Ergänzungen, 1 Löschungsrc/QUI/ERP/Shipping/Methods/Standard/ShippingType.php
- src/QUI/ERP/Shipping/Order/Shipping.php 10 Ergänzungen, 4 Löschungensrc/QUI/ERP/Shipping/Order/Shipping.php
- src/QUI/ERP/Shipping/Products/Fields/ShippingTimeFrontendView.php 1 Ergänzung, 3 Löschungen...ERP/Shipping/Products/Fields/ShippingTimeFrontendView.php
- src/QUI/ERP/Shipping/Rules/Factory.php 3 Ergänzungen, 1 Löschungsrc/QUI/ERP/Shipping/Rules/Factory.php
- src/QUI/ERP/Shipping/Rules/ShippingRule.php 6 Ergänzungen, 1 Löschungsrc/QUI/ERP/Shipping/Rules/ShippingRule.php
Bitte registrieren oder Anmelden zum Kommentieren