Skip to content
Code-Schnipsel Gruppen Projekte
  • Henning Leutz's avatar
    e8a56bf2
    fix(phpstan): better error handling and class usage · e8a56bf2
    verfasst von Henning Leutz
    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
    e8a56bf2
    Verlauf
    fix(phpstan): better error handling and class usage
    verfasst von Henning Leutz
    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