Skip to content
Code-Schnipsel Gruppen Projekte
  • Henning Leutz's avatar
    9233e394
    fix(phpstan): optimize attribute checks and method calls in erp classes · 9233e394
    verfasst von Henning Leutz
    In this commit, several changes have been made to streamline the Manufacturer and Process classes
    within the ERP module:
    
    - Replaced the non-empty check for 'firstname' and 'lastname' attributes in the User class with an
    `empty()` function, resulting in cleaner code without changing the functionality.
    - Replaced the argument in `User->activate()` from `false` to `''` for consistency.
    - Removed unnecessary annotations and some unused `protected` properties from the Process class.
    - Altered the procedure to retrieve `salesOrder` from the Entity in the Process class. Now, the
    method first tries to retrieve it via `getPaymentDataEntry()`, and if unavailable, it attempts to
    fetch it using `getCustomDataEntry()`. This ensures a more robust and reliable retrieval of the
    'salesOrder' property.
    - Added `@phpstan-ignore-next-line` in the Processes class to prevent phpstan from throwing
    unwarranted warnings regarding the following code line in specific scenarios.
    
    Related: #103
    9233e394
    Verlauf
    fix(phpstan): optimize attribute checks and method calls in erp classes
    verfasst von Henning Leutz
    In this commit, several changes have been made to streamline the Manufacturer and Process classes
    within the ERP module:
    
    - Replaced the non-empty check for 'firstname' and 'lastname' attributes in the User class with an
    `empty()` function, resulting in cleaner code without changing the functionality.
    - Replaced the argument in `User->activate()` from `false` to `''` for consistency.
    - Removed unnecessary annotations and some unused `protected` properties from the Process class.
    - Altered the procedure to retrieve `salesOrder` from the Entity in the Process class. Now, the
    method first tries to retrieve it via `getPaymentDataEntry()`, and if unavailable, it attempts to
    fetch it using `getCustomDataEntry()`. This ensures a more robust and reliable retrieval of the
    'salesOrder' property.
    - Added `@phpstan-ignore-next-line` in the Processes class to prevent phpstan from throwing
    unwarranted warnings regarding the following code line in specific scenarios.
    
    Related: #103