Skip to content
Code-Schnipsel Gruppen Projekte
  • Henning Leutz's avatar
    56156df7
    fix(phpstan): update variable types and fix bug conditions · 56156df7
    verfasst von Henning Leutz
    This commit brings a number of changes across multiple files. The changes include adjustment of
    variable types, fixing conditions, and the optimization of method calls.
    
    1. In src/QUI/ERP/Order/AbstractOrderProcessProvider.php, the function getDisplay has had its
    parameters realigned with AbstractOrderingStep, providing a clear type definition.
    
    2. src/QUI/ERP/Order/EventHandling.php has changed the onDetailEquipmentButtons function to expect
    a ProductTypeInterface, enabling a wider range of object types to be passed in.
    
    3. src/QUI/ERP/Order/Factory.php now only checks for an empty orderId, rather than also improperly
    comparing to zero.
    
    4. src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.php, a fallback has been added for when the
    method getImage does not exist on a Product object.
    
    5. src/QUI/ERP/Order/Mail.php has been updated to use the correct customer address method based on
    the user's type.
    
    6. Lastly, in src/QUI/ERP/Order/OrderView.php, the getShippingStatus method now correctly specifies
    null as a possible return type.
    
    Related: #172
    56156df7
    Verlauf
    fix(phpstan): update variable types and fix bug conditions
    verfasst von Henning Leutz
    This commit brings a number of changes across multiple files. The changes include adjustment of
    variable types, fixing conditions, and the optimization of method calls.
    
    1. In src/QUI/ERP/Order/AbstractOrderProcessProvider.php, the function getDisplay has had its
    parameters realigned with AbstractOrderingStep, providing a clear type definition.
    
    2. src/QUI/ERP/Order/EventHandling.php has changed the onDetailEquipmentButtons function to expect
    a ProductTypeInterface, enabling a wider range of object types to be passed in.
    
    3. src/QUI/ERP/Order/Factory.php now only checks for an empty orderId, rather than also improperly
    comparing to zero.
    
    4. src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.php, a fallback has been added for when the
    method getImage does not exist on a Product object.
    
    5. src/QUI/ERP/Order/Mail.php has been updated to use the correct customer address method based on
    the user's type.
    
    6. Lastly, in src/QUI/ERP/Order/OrderView.php, the getShippingStatus method now correctly specifies
    null as a possible return type.
    
    Related: #172