Skip to content
Code-Schnipsel Gruppen Projekte
  1. Mär 05, 2025
  2. Mär 04, 2025
    • Patrick Müller's avatar
      Merge branch 'next-2.x' into 'main' · 1ddc952f
      verfasst von Patrick Müller
      Next 2.x
      
      See merge request !20
      2.1.4
      1ddc952f
    • Patrick Müller's avatar
      fix: allow NULL in formatDate · 9a4d6317
      verfasst von Patrick Müller
      9a4d6317
    • Patrick Müller's avatar
    • Patrick Müller's avatar
      Merge branch 'next-2.x' into 'main' · e81c90ff
      verfasst von Patrick Müller
      fix: query quiqqer user int id for membership users
      
      See merge request !18
      2.1.3
      e81c90ff
    • Patrick Müller's avatar
      style: code style · 98bbd033
      verfasst von Patrick Müller
      98bbd033
    • Patrick Müller's avatar
      11e2dc09
    • Henning Leutz's avatar
      Merge branch 'next-2.x' into 'main' · 5fc98a7f
      verfasst von Henning Leutz
      chore: update phpstan version in phive configuration
      
      See merge request !16
      2.1.2
      5fc98a7f
    • Henning Leutz's avatar
      Merge branch 'feat-phpstan' into 'next-2.x' · 95923548
      verfasst von Henning Leutz
      fix: improve type consistency and readability in memberships
      
      See merge request !15
      95923548
    • Henning Leutz's avatar
      fix(phpstan): ignored specific phpstan error · 2eb9896b
      verfasst von Henning Leutz
      Updated the phpstan-baseline.neon file to ignore an error regarding the return type of the
      getContract() method in the MembershipUser class.
      2eb9896b
    • Henning Leutz's avatar
      fix(phpstan): handle missing class in MembershipUser · 26620364
      verfasst von Henning Leutz
      Adjusted the handling of the missing `QUI\\ERP\\Accounting\\Contracts\\Contract` class within the
      `getCurrentCancelEndDate()` method of MembershipUser to return the cycle end date. This ensures the
      correct return of an end date even if the contract class doesn't exist.
      26620364
    • Henning Leutz's avatar
      fix(phpstan): improve compatibility with quiqqer/erp · 856decf1
      verfasst von Henning Leutz
      Added checks for the existence of various classes from quiqqer/erp before trying to use them. This
      ensures that the code fails gracefully if the expected classes are not present, for instance if the
      quiqqer/erp package is not installed.
      
      Also added a new dependency on quiqqer/erp in `composer.json`. This will prevent the code from
      being installed without the necessary package, but in case it's removed or not loaded for some
      reason, the new checks still provide a safety net.
      856decf1
    • Henning Leutz's avatar
      fix(phpstan): ensure class existence before use · ae4c675a
      verfasst von Henning Leutz
      This commit adds checks to ensure that specific classes exist before they are used. This adds
      greater fault tolerance to the code by precluding attempts to use non-existent classes which would
      cause a fatal error. This has been applied to functions within the 'Handler.php' and
      'Membership.php' files. In 'Handler.php', checks have been added for existence of the
      'QUI\\ERP\\Products\\Handler\\Categories' and 'QUI\\ERP\\Products\\Handler\\Fields' classes. In
      'Membership.php', checks have been added for 'QUI\\ERP\\Products\\Search\\BackendSearch',
      'QUI\\ERP\\Products\\Handler\\Products', 'QUI\\ERP\\Products\\Handler\\Fields',
      'QUI\\ERP\\Plans\\Handler', and 'QUI\\ERP\\Plans\\PlanProduct'.
      ae4c675a
    • Henning Leutz's avatar
      fix(phpstan): add class_exists checks to mitigate errors · 48459618
      verfasst von Henning Leutz
      Added checks to confirm existence of certain classes before their use in ajax/memberships/lock.php,
      ajax/memberships/products/getMembershipProducts.php and ajax/memberships/unlock.php. This change
      helps prevent unexpected errors during runtime.
      48459618
    • Patrick Müller's avatar
      fix: do not use non-existing method · 462c4742
      verfasst von Patrick Müller
      462c4742
    • Henning Leutz's avatar
      refactor(phpcs): improve code readability in `MembershipUser.php` · e64d3393
      verfasst von Henning Leutz
      This commit refactors `MembershipUser.php` to improve code readability. It does this by including
      spaces around the concatenation operators for better visual separation. This makes the identifiers
      for verification checks much more readable.
      e64d3393
    • Henning Leutz's avatar
      fix(phpstan): clean up and simplify code across multiple files · 6d552ca5
      verfasst von Henning Leutz
      The membership-related code was cleaned up across `getList.php`, `Handler.php`, `Membership.php`,
      `Users/Handler.php`, and `Users/MembershipUser.php` files. Removed unnecessary comments and
      @phpstan-ignore lines. Added strict type checking where it was missing and restructured some
      conditions for better readability. Also, simplified the return statements in some methods.
      6d552ca5
    • Patrick Müller's avatar
      fix: phpstan errors · 68765f13
      verfasst von Patrick Müller
      68765f13
    • Henning Leutz's avatar
      refactor(phpstan): improve type definitions and error handling · 09bc150f
      verfasst von Henning Leutz
      This commit refactors several areas of the code to improve type definitions and error handling.
      Main changes include:
      - Improved the type definitions for function arguments and return types within the Handler,
      Membership and Users Handler classes.
      - Added error handling for instances where the Membership is not an instance of
      QUI\Memberships\Membership.
      - Updated the commenting style to more clearly define variables.
      - Changed the use of \PDO to PDO for cleaner code.
      - Removed unnecessary conditionals in the WHERE clause building of an SQL query, leading to
      cleaner, more straightforward code.
      09bc150f
    • Henning Leutz's avatar
      fix(phpstan): improve code flexibility and robustness · 76427fe2
      verfasst von Henning Leutz
      - Removed redundant docblock.
      - Added instance check for `$User` before attempting to remove it from groups to prevent potential
      errors.
      - Ensured `hasMembershipUserId` method exists before calling it to prevent undefined method errors.
      - Adjusted `addHistoryEntry` function to receive a string as the second parameter instead of an
      array.
      - Removed redundant array-to-string conversion in `addHistoryEntry` function.
      - Ignored `phpstan` warning regarding method's return type.
      76427fe2
    • Henning Leutz's avatar
      fix(phpstan): improve return types and exception handling in memberships · 8aa6d8de
      verfasst von Henning Leutz
      This commit addresses three major updates in our Memberships module:
      
      1. In Handler.php, we clarified the return type of `isLinkedToContracts()` method by explicitly
      defining it as boolean.
      2. In AbstractMembershipUserLinkVerificationHandler.php, we simplified the Exception import and
      updated the type in the `getMembershipUser()` method's doc comment.
      3. In MembershipUser.php, the constructors for `CancelVerification` and `AbortCancelVerification`
      are now called without the user id.
      
      These changes enhance code readability and maintainability while ensuring safer calls.
      8aa6d8de
    • Henning Leutz's avatar
      fix: improve type consistency and readability in memberships · 0978b32e
      verfasst von Henning Leutz
      This commit improves the type consistency and readability of the code in the Membership class and
      related classes. The changes include adding strict types, removing unused imports, using type
      hinting, and replacing old switch-case syntax with match expressions.
      
      Specifically, it changes the signature of several functions, adds and removes some class imports,
      and replaces old style function syntax with modern type hinting for better readability and
      maintainability. Moreover, it adds PHP built-in functions instead of using their fully qualified
      form. It also improves readability by replacing the switch-case syntax with the new and more
      convenient match expression when parsing intervals from the duration.
      0978b32e
    • Henning Leutz's avatar
      9bb21fd6
  3. Mär 03, 2025
  4. Jan 08, 2025
  5. Jan 03, 2025