Skip to content
Code-Schnipsel Gruppen Projekte
  1. Feb 27, 2025
  2. Feb 26, 2025
  3. Feb 25, 2025
  4. Feb 24, 2025
  5. Feb 23, 2025
    • Henning Leutz's avatar
      chore(phpstan): ignore phpstan errors due to missing classes · 082aef60
      verfasst von Henning Leutz
      Ignored various PHPStan errors in 'phpstan-baseline.neon' file due to missing classes and methods.
      Many of these errors were related to the ERP, Shipping, and Invoice modules. This fix suppresses
      the error reporting to ensure smooth operation of the rest of the code base. However, it's
      recommended to address these missing dependencies for a long-term solution.
      082aef60
    • Henning Leutz's avatar
      style(phpstan): improve code readability in OutputProviderOrder · 2f717949
      verfasst von Henning Leutz
      Rearranged conditional statement checks for better readability. This involves the check for whether
      the class 'QUI\\ERP\\Payments\\SEPA\\Provider' exists and if 'quiqqer/payment-sepa' package is
      installed.
      2f717949
    • Henning Leutz's avatar
      style: correct typo in comments · d2626882
      verfasst von Henning Leutz
      Fixed a typo in the comment of `getEntityTypeTitle` method in `OutputProviderOrder.php` file. The
      word "ommitted" is replaced with "omitted".
      d2626882
    • Henning Leutz's avatar
      fix(phpstan): ajax - improve null checking and function existence verification · 19046b7b
      verfasst von Henning Leutz
      Changes include:
      
      1) In `removePos.php`, removed the usage of null safe method call, as it was not needed.
      2) In `getOrderControl.php`, added a null guard before trying to get view from the OrderProcess and
      use it. If the method does not exist, null will be assigned to `$View`.
      3) Removed unnecessary fallback to get the first step in `getStep.php`. The current step is enough.
      4) In `savePayment.php` added a check for the existence of 'savePayment' method before invoking it
      to avoid possible errors.
      5) The fallback to get the first step was also removed in `reload.php`.
      6) Removed an unnecessary if condition in `send.php` and directly assigned current step's name to
      `$current`.
      7) In `setQuantity.php`, added a verification to check the existence of 'setQuantity' method before
      calling it.
      
      Related: #172
      19046b7b
    • Henning Leutz's avatar
      fix(phpstan): handle non-existing classes in abstractOrder.php · afb39d80
      verfasst von Henning Leutz
      This commit fixes the errors arising from non-existing classes in the AbstractOrder.php
      
      Changes include:
      - Added a comment on the shipping validation
      - Corrected type declaration in the reversal function signature to include the possibility of the
      parameter being null.
      - Checked for the existence of ShippingStatus and ShippingEntry classes before attempting to get
      Shipping status and Shipping Ids, respectively. This prevents errors if these classes do not exist.
      
      Related: #172
      afb39d80
    • Henning Leutz's avatar
      fix(phpunit): improve method existence checks in product handling code · 088220b6
      verfasst von Henning Leutz
      Extended the method existence checks throughout src/QUI/ERP/Order/Basket/ files. Improved the
      robustness of the code by ensuring that methods such as 'getUuid', 'getProductSetParentUuid',
      'getQuantity', 'toArticle', and 'getAttributesForUniqueField' exist before calling them, thus
      preventing potential undefined method errors. Removed unnecessary comments used for type hinting in
      favor of functional checks.
      
      Related: #172
      088220b6
    • Henning Leutz's avatar
      refactor(phpstan): improve order handling and cleanup code · fdc7309a
      verfasst von Henning Leutz
      Changes include:
      - Updated `AbstractOrderingStep.php` to handle null case in `getOrder` method and modified return
      type.
      - Refactored `Order.php` to remove unnecessary checks and improve readability.
      - Ensured safety against calling non-existent `save()` method in `Checkout.php`.
      - Simplified address getting logic in `CustomerData.php`.
      - Removed unnecessary check in isUserB2B function.
      
      Related: #172
      fdc7309a
    • Henning Leutz's avatar
      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
    • Henning Leutz's avatar
      style: update code formatting and type declarations · 222a914c
      verfasst von Henning Leutz
      Changes include:
      - Modified code formatting to improve readability and conform to best coding practices.
      - Updated type declarations using pipe (|) operator to indicate variable can hold multiple types.
      - Adjusted the spacing around the pipe operator in type declarations for improved readability.
      222a914c
    • Henning Leutz's avatar
      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
    • Henning Leutz's avatar
      refactor(phpunit): ensure consistent handling of processing status id · f11a7d4b
      verfasst von Henning Leutz
      This commit improves the way processing status id is handled across different methods in the
      ProcessingStatus module. Now, we consistently cast processing status id as string before passing it
      to the config setter methods, eliminating any potential issues that might occur due to variable
      type inconsistencies. Changes are applied to the Factory and Handler classes alike.
      
      Related: #172
      f11a7d4b
    • Henning Leutz's avatar
      fix(phpstan): update abstractorder and other files for consistent function behaviour · a5f3b8e5
      verfasst von Henning Leutz
      Updated AbstractOrder.php to return null instead of false in getShippingStatus() when the shipping
      status is not set. This makes the method's behaviour more consistent.
      
      Updated Search.php to add a condition check for class existence before retrieving shipping status.
      This ensures that the code will not fail if the class is not defined.
      
      Modified DataLayer.php to add a condition check for class existence before retrieving shipping.
      
      Added @phpstan-ignore-next-line in Utils.php to silence phpstan for the next line of code.
      
      Related: #172
      a5f3b8e5
    • Henning Leutz's avatar
      refactor(phpstan): php8.4 null deprecated · b7d4519e
      verfasst von Henning Leutz
      b7d4519e
    • Henning Leutz's avatar
      chore(phpstan): update phpstan version in phive/phars.xml · 48eef914
      verfasst von Henning Leutz
      Updated the version of `phpstan` from `1.11.8` to `1.*` and set the installed version as `1.12.13`
      in .phive/phars.xml. This should ensure we're always using the latest version of `phpstan` that
      matches the specified range.
      48eef914
  6. Feb 22, 2025
  7. Feb 19, 2025
  8. Feb 10, 2025
  9. Feb 07, 2025
  10. Feb 06, 2025
    • Henning Leutz's avatar
      Merge branch 'next-2.x' into 'main' · a2a73f70
      verfasst von Henning Leutz
      fix(Basket): improve basket id handling and user check in Basket.php
      
      See merge request !138
      2.7.19
      a2a73f70
    • Henning Leutz's avatar
      refactor: update union types with null · ca954d77
      verfasst von Henning Leutz
      Improve readability and interpretability of code by explicitly stating null in union types. This
      change has been applied across multiple files and functions.
      
      PHP8.4 compatibility
      ca954d77
    • Henning Leutz's avatar
      fix(Basket): improve basket id handling and user check in Basket.php · 30906ba4
      verfasst von Henning Leutz
      Added a conditional check in src/QUI/ERP/Order/Basket/Basket.php to convert basketId to actual id
      from user's session if it is a boolean value. This fixes potential issues that may arise with
      non-integer basketIds.
      
      Also, introduced a safeguard check before saving to ensure there is a valid User. If not, the save
      function is exited early to prevent potential errors or undesired actions.
      30906ba4
  11. Feb 04, 2025
  12. Jan 20, 2025