Skip to content
Code-Schnipsel Gruppen Projekte
Commit e8a56bf2 erstellt von Henning Leutz's avatar Henning Leutz :martial_arts_uniform:
Dateien durchsuchen

fix(phpstan): better error handling and class usage

This commit fixes several areas:

1. It changes class type in BasketOrder from QUI\\Users\\User to QUI\\Interfaces\\Users\\User.

2. It refactors Order to better handle if statements and moves verification of class existence up
to the beginning. Fix involves assuming that function getInvoiceAddress and getDeliveryAddress
always return a non-null value. It also updates on how we check class exists for Shipping data.

3. In OrderInProcess, now we check if method 'toArticle' exists on the Product object before
calling it and applies similar class checking like in Order for Shipping data.

4. Corrects and standardizes the casing for exception catching in OrderProcess.

In summary, these changes lead to a safer and cleaner code base by addressing potential Null
Pointer Exceptions and ensuring the existence of classes before they are being called.

Related: #172
Übergeordneter f11a7d4b
No related branches found
No related tags found
2 Merge Requests!146fix: update `getCustomerFiles` method signature in `AbstractOrder`,!145Update 'next-3.x' with latest changes from 'main'
Pipeline #15527 fehlgeschlagen mit Phase
in 2 Minuten und 31 Sekunden
0% oder .
You are about to add 0 people to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Bitte registrieren oder zum Kommentieren