From d4b3d4e567b94013c1e734b84c585671e2191edc Mon Sep 17 00:00:00 2001
From: Henning Leutz <leutz@pcsg.de>
Date: Wed, 3 Mar 2021 11:23:54 +0100
Subject: [PATCH] refactor: return hints

---
 src/QUI/ERP/Discount/EventHandling.php | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/QUI/ERP/Discount/EventHandling.php b/src/QUI/ERP/Discount/EventHandling.php
index 83acd3f..4b452c6 100644
--- a/src/QUI/ERP/Discount/EventHandling.php
+++ b/src/QUI/ERP/Discount/EventHandling.php
@@ -34,7 +34,7 @@ class EventHandling
      *
      * @return Handler
      */
-    protected static function getHandler()
+    protected static function getHandler(): ?Handler
     {
         if (self::$Handler === null) {
             self::$Handler = new Handler();
@@ -49,7 +49,7 @@ protected static function getHandler()
      * @param QUI\Interfaces\Users\User $User
      * @return array
      */
-    protected static function getUserDiscounts(QUI\Interfaces\Users\User $User)
+    protected static function getUserDiscounts(QUI\Interfaces\Users\User $User): array
     {
         if (isset(self::$userDiscounts[$User->getId()])) {
             return self::$userDiscounts[$User->getId()];
@@ -65,10 +65,10 @@ protected static function getUserDiscounts(QUI\Interfaces\Users\User $User)
      * - Einkaufsmengeprüfung
      *
      * @param Discount $Discount
-     * @param integer|double|float $quantity
+     * @param integer|double $quantity
      * @return bool
      */
-    public static function isDiscountUsableWithQuantity(Discount $Discount, $quantity)
+    public static function isDiscountUsableWithQuantity(Discount $Discount, $quantity): bool
     {
         $purchaseQuantityFrom  = $Discount->getAttribute('purchase_quantity_from');
         $purchaseQuantityUntil = $Discount->getAttribute('purchase_quantity_until');
@@ -97,10 +97,10 @@ public static function isDiscountUsableWithQuantity(Discount $Discount, $quantit
      * - Einkaufswertprüfung
      *
      * @param Discount $Discount
-     * @param integer|double|float $value
+     * @param integer|double $value
      * @return bool
      */
-    public static function isDiscountUsableWithPurchaseValue(Discount $Discount, $value)
+    public static function isDiscountUsableWithPurchaseValue(Discount $Discount, $value): bool
     {
         $purchaseValueFrom  = $Discount->getAttribute('purchase_value_from');
         $purchaseValueUntil = $Discount->getAttribute('purchase_value_until');
@@ -208,7 +208,7 @@ public static function onQuiqqerProductsCalcListProduct(
      *
      * @param Calc $Calc
      * @param ProductList $List
-     * @param integer|double|float $nettoSum
+     * @param integer|double $nettoSum
      */
     public static function onQuiqqerProductsCalcList(
         Calc $Calc,
-- 
GitLab