diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 45f1aecca43fa621a058940b636c10c03166f85d..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -1,676 +0,0 @@ -parameters: - ignoreErrors: - - - message: "#^Parameter \\#6 \\$User of static method QUI\\\\ERP\\\\Accounting\\\\Payments\\\\Transactions\\\\Factory\\:\\:createPaymentTransaction\\(\\) expects null, QUI\\\\Interfaces\\\\Users\\\\User given\\.$#" - count: 1 - path: ajax/backend/addPayment.php - - - - message: "#^Call to method getUUID\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 1 - path: ajax/backend/createInvoice.php - - - - message: "#^Call to method getUUID\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 1 - path: ajax/backend/createInvoice.php - - - - message: "#^Call to method getUUID\\(\\) on an unknown class QUI\\\\ERP\\\\SalesOrders\\\\SalesOrder\\.$#" - count: 1 - path: ajax/backend/createSalesOrder.php - - - - message: "#^Call to method getUUID\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 1 - path: ajax/backend/post.php - - - - message: "#^Call to method getUUID\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 1 - path: ajax/backend/post.php - - - - message: "#^Parameter \\#2 \\$User of class QUI\\\\ERP\\\\Order\\\\Basket\\\\BasketOrder constructor expects QUI\\\\Users\\\\User\\|null, QUI\\\\Interfaces\\\\Users\\\\User given\\.$#" - count: 1 - path: ajax/frontend/basket/controls/basket.php - - - - message: "#^Using nullsafe method call on non\\-nullable type QUI\\\\ERP\\\\Products\\\\Product\\\\ProductList\\. Use \\-\\> instead\\.$#" - count: 1 - path: ajax/frontend/basket/removePos.php - - - - message: "#^Parameter \\#2 \\$User of class QUI\\\\ERP\\\\Order\\\\Basket\\\\BasketOrder constructor expects QUI\\\\Users\\\\User\\|null, QUI\\\\Interfaces\\\\Users\\\\User given\\.$#" - count: 1 - path: ajax/frontend/basket/save.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Order\\\\AbstractOrder\\:\\:getView\\(\\)\\.$#" - count: 1 - path: ajax/frontend/order/getOrderControl.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: ajax/frontend/order/getStep.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Order\\\\Controls\\\\AbstractOrderingStep\\:\\:savePayment\\(\\)\\.$#" - count: 1 - path: ajax/frontend/order/processing/savePayment.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: ajax/frontend/order/reload.php - - - - message: "#^If condition is always true\\.$#" - count: 1 - path: ajax/frontend/order/send.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:setQuantity\\(\\)\\.$#" - count: 1 - path: ajax/frontend/order/setQuantity.php - - - - message: "#^Call to method canUsedBy\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Call to method canUsedInErpEntity\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Call to method getId\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Call to method getId\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Call to method getType\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Call to method getType\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Call to method isValid\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Call to method setErpEntity\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Cannot call method getId\\(\\) on QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\|true\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\AbstractOrder\\:\\:getShipping\\(\\) has invalid return type QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\.$#" - count: 2 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\AbstractOrder\\:\\:getShippingStatus\\(\\) has invalid return type QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\.$#" - count: 2 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Parameter \\#1 \\$Shipping of method QUI\\\\ERP\\\\Order\\\\AbstractOrder\\:\\:validateShipping\\(\\) expects QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\|null, QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\|null given\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Parameter \\#2 \\$User of class QUI\\\\ERP\\\\Order\\\\Basket\\\\BasketOrder constructor expects QUI\\\\Users\\\\User\\|null, QUI\\\\ERP\\\\User\\|null given\\.$#" - count: 1 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Parameter \\$Shipping of method QUI\\\\ERP\\\\Order\\\\AbstractOrder\\:\\:setShipping\\(\\) has invalid type QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\.$#" - count: 2 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Parameter \\$Shipping of method QUI\\\\ERP\\\\Order\\\\AbstractOrder\\:\\:validateShipping\\(\\) has invalid type QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\.$#" - count: 2 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Parameter \\$status of method QUI\\\\ERP\\\\Order\\\\AbstractOrder\\:\\:setShippingStatus\\(\\) has invalid type QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\.$#" - count: 2 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Property QUI\\\\ERP\\\\Order\\\\AbstractOrder\\:\\:\\$ShippingStatus has unknown class QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status as its type\\.$#" - count: 2 - path: src/QUI/ERP/Order/AbstractOrder.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:getProductSetParentUuid\\(\\)\\.$#" - count: 2 - path: src/QUI/ERP/Order/Basket/Basket.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:getQuantity\\(\\)\\.$#" - count: 2 - path: src/QUI/ERP/Order/Basket/Basket.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:getUuid\\(\\)\\.$#" - count: 2 - path: src/QUI/ERP/Order/Basket/Basket.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:toArticle\\(\\)\\.$#" - count: 1 - path: src/QUI/ERP/Order/Basket/Basket.php - - - - message: "#^Class QUI\\\\ERP\\\\Order\\\\Exception referenced with incorrect case\\: QUI\\\\Erp\\\\Order\\\\Exception\\.$#" - count: 1 - path: src/QUI/ERP/Order/Basket/Basket.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:getQuantity\\(\\)\\.$#" - count: 1 - path: src/QUI/ERP/Order/Basket/BasketGuest.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:getQuantity\\(\\)\\.$#" - count: 2 - path: src/QUI/ERP/Order/Basket/BasketOrder.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:setQuantity\\(\\)\\.$#" - count: 1 - path: src/QUI/ERP/Order/Basket/BasketOrder.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:toArray\\(\\)\\.$#" - count: 1 - path: src/QUI/ERP/Order/Basket/BasketOrder.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:toArticle\\(\\)\\.$#" - count: 1 - path: src/QUI/ERP/Order/Basket/BasketOrder.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\FieldInterface\\:\\:getAttributesForUniqueField\\(\\)\\.$#" - count: 1 - path: src/QUI/ERP/Order/Basket/Product.php - - - - message: "#^Class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary not found\\.$#" - count: 2 - path: src/QUI/ERP/Order/Controls/Order/Order.php - - - - message: "#^Instanceof between null and QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary will always evaluate to false\\.$#" - count: 1 - path: src/QUI/ERP/Order/Controls/Order/Order.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Order\\\\AbstractOrder\\:\\:save\\(\\)\\.$#" - count: 1 - path: src/QUI/ERP/Order/Controls/OrderProcess/Checkout.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: src/QUI/ERP/Order/Controls/OrderProcess/Checkout.php - - - - message: "#^Negated boolean expression is always false\\.$#" - count: 1 - path: src/QUI/ERP/Order/Controls/OrderProcess/CustomerData.php - - - - message: "#^Parameter \\#2 \\$Step of method QUI\\\\ERP\\\\Order\\\\AbstractOrderProcessProvider\\:\\:getDisplay\\(\\) expects null, \\$this\\(QUI\\\\ERP\\\\Order\\\\Controls\\\\OrderProcess\\\\Processing\\) given\\.$#" - count: 1 - path: src/QUI/ERP/Order/Controls/OrderProcess/Processing.php - - - - message: "#^Call to method getData\\(\\) on an unknown class QUI\\\\ERP\\\\SalesOrders\\\\SalesOrder\\.$#" - count: 2 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Call to method getShipping\\(\\) on an unknown class QUI\\\\ERP\\\\SalesOrders\\\\SalesOrder\\.$#" - count: 2 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Call to method getShippingStatus\\(\\) on an unknown class QUI\\\\ERP\\\\SalesOrders\\\\SalesOrder\\.$#" - count: 2 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Call to static method getInstance\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Handler\\.$#" - count: 1 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Instanceof between \\*NEVER\\* and QUI\\\\ERP\\\\Products\\\\Product\\\\Types\\\\VariantChild will always evaluate to false\\.$#" - count: 1 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Parameter \\$Invoice of method QUI\\\\ERP\\\\Order\\\\EventHandling\\:\\:onQuiqqerInvoiceTemporaryInvoicePostEnd\\(\\) has invalid type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 2 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Parameter \\$InvoiceTemporary of method QUI\\\\ERP\\\\Order\\\\EventHandling\\:\\:onQuiqqerInvoiceTemporaryInvoicePostEnd\\(\\) has invalid type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 2 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Parameter \\$SalesOrder of method QUI\\\\ERP\\\\Order\\\\EventHandling\\:\\:onQuiqqerSalesOrdersSaveEnd\\(\\) has invalid type QUI\\\\ERP\\\\SalesOrders\\\\SalesOrder\\.$#" - count: 1 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Result of \\|\\| is always true\\.$#" - count: 1 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Unreachable statement \\- code above always terminates\\.$#" - count: 1 - path: src/QUI/ERP/Order/EventHandling.php - - - - message: "#^Comparison operation \"\\!\\=\" between ''\\|'0'\\|array\\{\\}\\|false and 0 results in an error\\.$#" - count: 1 - path: src/QUI/ERP/Order/Factory.php - - - - message: "#^Call to method getAttribute\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 1 - path: src/QUI/ERP/Order/FrontendUsers/Controls/UserOpenedOrders.php - - - - message: "#^Call to method getAttribute\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 1 - path: src/QUI/ERP/Order/FrontendUsers/Controls/UserOpenedOrders.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductTypeInterface\\:\\:getImage\\(\\)\\.$#" - count: 1 - path: src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.php - - - - message: "#^Call to method getAttribute\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 2 - path: src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.php - - - - message: "#^Call to method getAttribute\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 2 - path: src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.php - - - - message: "#^Cannot call method getTitle\\(\\) on QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\|true\\.$#" - count: 1 - path: src/QUI/ERP/Order/FrontendUsers/Controls/UserOrders.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Order\\\\OrderInterface\\:\\:getAttribute\\(\\)\\.$#" - count: 2 - path: src/QUI/ERP/Order/Mail.php - - - - message: "#^Call to method createPDF\\(\\) on an unknown class QUI\\\\HtmlToPdf\\\\Document\\.$#" - count: 1 - path: src/QUI/ERP/Order/Mail.php - - - - message: "#^Call to method setContentHTML\\(\\) on an unknown class QUI\\\\HtmlToPdf\\\\Document\\.$#" - count: 1 - path: src/QUI/ERP/Order/Mail.php - - - - message: "#^Instantiated class QUI\\\\HtmlToPdf\\\\Document not found\\.$#" - count: 1 - path: src/QUI/ERP/Order/Mail.php - - - - message: "#^Method QUI\\\\Interfaces\\\\Users\\\\User\\:\\:getAddress\\(\\) invoked with 0 parameters, 1 required\\.$#" - count: 1 - path: src/QUI/ERP/Order/Mail.php - - - - message: "#^Call to method getId\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\.$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Call to method toJSON\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\.$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Call to static method addressRequirement\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Utils\\\\Invoice\\.$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Call to static method addressRequirementThreshold\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Utils\\\\Invoice\\.$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Call to static method createSalesOrder\\(\\) on an unknown class QUI\\\\ERP\\\\SalesOrders\\\\Handler\\.$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Call to static method getInstance\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Factory\\.$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Call to static method getInstance\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Handler\\.$#" - count: 6 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Cannot call method getId\\(\\) on QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\|true\\.$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^If condition is always true\\.$#" - count: 2 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Instantiated class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Exception not found\\.$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\Order\\:\\:createInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 2 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\Order\\:\\:createInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 2 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\Order\\:\\:createSalesOrder\\(\\) has invalid return type QUI\\\\ERP\\\\SalesOrders\\\\SalesOrder\\.$#" - count: 2 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\Order\\:\\:getInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 2 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\Order\\:\\:getInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 2 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\Order\\:\\:post\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 2 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\Order\\:\\:post\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 2 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^PHPDoc tag @throws with type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Exception\\|QUI\\\\Exception is not subtype of Throwable$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Throwing object of an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Exception\\.$#" - count: 1 - path: src/QUI/ERP/Order/Order.php - - - - message: "#^Call to an undefined method QUI\\\\ERP\\\\Products\\\\Interfaces\\\\ProductInterface\\:\\:toArticle\\(\\)\\.$#" - count: 1 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^Call to method getId\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\.$#" - count: 1 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^Call to method toArray\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\.$#" - count: 1 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^Cannot call method getId\\(\\) on QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\|true\\.$#" - count: 1 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^Instantiated class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Exception not found\\.$#" - count: 1 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderInProcess\\:\\:getInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderInProcess\\:\\:getInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^PHPDoc tag @throws with type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Exception\\|QUI\\\\Exception is not subtype of Throwable$#" - count: 1 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^Parameter \\#2 \\$User of class QUI\\\\ERP\\\\Order\\\\Basket\\\\BasketOrder constructor expects QUI\\\\Users\\\\User\\|null, QUI\\\\ERP\\\\User\\|null given\\.$#" - count: 1 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^Throwing object of an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Exception\\.$#" - count: 1 - path: src/QUI/ERP/Order/OrderInProcess.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderInterface\\:\\:getInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderInterface.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderInterface\\:\\:getInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderInterface.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderInterface\\:\\:getShipping\\(\\) has invalid return type QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderInterface.php - - - - message: "#^PHPDoc tag @throws with type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Exception is not subtype of Throwable$#" - count: 1 - path: src/QUI/ERP/Order/OrderInterface.php - - - - message: "#^Parameter \\$Shipping of method QUI\\\\ERP\\\\Order\\\\OrderInterface\\:\\:setShipping\\(\\) has invalid type QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderInterface.php - - - - message: "#^Class QUI\\\\ERP\\\\Order\\\\Exception referenced with incorrect case\\: QUI\\\\Erp\\\\Order\\\\Exception\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderProcess.php - - - - message: "#^Left side of && is always true\\.$#" - count: 1 - path: src/QUI/ERP/Order/OrderProcess.php - - - - message: "#^Parameter \\#2 \\$User of class QUI\\\\ERP\\\\Order\\\\Basket\\\\BasketOrder constructor expects QUI\\\\Users\\\\User\\|null, QUI\\\\Interfaces\\\\Users\\\\User given\\.$#" - count: 1 - path: src/QUI/ERP/Order/OrderProcess.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderView\\:\\:getInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderView.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderView\\:\\:getInvoice\\(\\) has invalid return type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderView.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderView\\:\\:getShipping\\(\\) has invalid return type QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderView.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderView\\:\\:getShippingStatus\\(\\) has invalid return type QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderView.php - - - - message: "#^Method QUI\\\\ERP\\\\Order\\\\OrderView\\:\\:toPDF\\(\\) has invalid return type QUI\\\\HtmlToPdf\\\\Document\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderView.php - - - - message: "#^PHPDoc tag @throws with type QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Exception\\|QUI\\\\Exception is not subtype of Throwable$#" - count: 1 - path: src/QUI/ERP/Order/OrderView.php - - - - message: "#^Parameter \\$Shipping of method QUI\\\\ERP\\\\Order\\\\OrderView\\:\\:setShipping\\(\\) has invalid type QUI\\\\ERP\\\\Shipping\\\\Api\\\\ShippingInterface\\.$#" - count: 2 - path: src/QUI/ERP/Order/OrderView.php - - - - message: "#^Access to constant ECC_M on an unknown class chillerlan\\\\QRCode\\\\QRCode\\.$#" - count: 1 - path: src/QUI/ERP/Order/Output/OutputProviderOrder.php - - - - message: "#^Access to constant OUTPUT_IMAGE_PNG on an unknown class chillerlan\\\\QRCode\\\\QRCode\\.$#" - count: 1 - path: src/QUI/ERP/Order/Output/OutputProviderOrder.php - - - - message: "#^Access to constant VERSION_AUTO on an unknown class chillerlan\\\\QRCode\\\\QRCode\\.$#" - count: 1 - path: src/QUI/ERP/Order/Output/OutputProviderOrder.php - - - - message: "#^Call to method render\\(\\) on an unknown class chillerlan\\\\QRCode\\\\QRCode\\.$#" - count: 1 - path: src/QUI/ERP/Order/Output/OutputProviderOrder.php - - - - message: "#^Instantiated class chillerlan\\\\QRCode\\\\QRCode not found\\.$#" - count: 1 - path: src/QUI/ERP/Order/Output/OutputProviderOrder.php - - - - message: "#^Instantiated class chillerlan\\\\QRCode\\\\QROptions not found\\.$#" - count: 1 - path: src/QUI/ERP/Order/Output/OutputProviderOrder.php - - - - message: "#^Parameter \\#2 \\$key of method QUI\\\\Config\\:\\:setValue\\(\\) expects string\\|null, int given\\.$#" - count: 1 - path: src/QUI/ERP/Order/ProcessingStatus/Factory.php - - - - message: "#^Parameter \\#2 \\$key of method QUI\\\\Config\\:\\:del\\(\\) expects string\\|null, int given\\.$#" - count: 1 - path: src/QUI/ERP/Order/ProcessingStatus/Handler.php - - - - message: "#^Parameter \\#2 \\$key of method QUI\\\\Config\\:\\:setValue\\(\\) expects string\\|null, int given\\.$#" - count: 2 - path: src/QUI/ERP/Order/ProcessingStatus/Handler.php - - - - message: "#^Call to method getAttribute\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 1 - path: src/QUI/ERP/Order/Search.php - - - - message: "#^Call to method getAttribute\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 1 - path: src/QUI/ERP/Order/Search.php - - - - message: "#^Call to method getUUID\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Invoice\\.$#" - count: 1 - path: src/QUI/ERP/Order/Search.php - - - - message: "#^Call to method getUUID\\(\\) on an unknown class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\InvoiceTemporary\\.$#" - count: 1 - path: src/QUI/ERP/Order/Search.php - - - - message: "#^Cannot call method getColor\\(\\) on QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\|true\\.$#" - count: 1 - path: src/QUI/ERP/Order/Search.php - - - - message: "#^Cannot call method getId\\(\\) on QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\|true\\.$#" - count: 1 - path: src/QUI/ERP/Order/Search.php - - - - message: "#^Cannot call method getTitle\\(\\) on QUI\\\\ERP\\\\Shipping\\\\ShippingStatus\\\\Status\\|true\\.$#" - count: 1 - path: src/QUI/ERP/Order/Search.php - - - - message: "#^Result of closure \\(void\\) is used\\.$#" - count: 1 - path: src/QUI/ERP/Order/Search.php - - - - message: "#^Call to method getPrice\\(\\) on an unknown class QUI\\\\ERP\\\\Shipping\\\\Types\\\\ShippingEntry\\.$#" - count: 1 - path: src/QUI/ERP/Order/Utils/DataLayer.php - - - - message: "#^Class QUI\\\\ERP\\\\Accounting\\\\Invoice\\\\Articles\\\\Text not found\\.$#" - count: 1 - path: src/QUI/ERP/Order/Utils/Utils.php - - - - message: "#^Empty array passed to foreach\\.$#" - count: 1 - path: src/QUI/ERP/Order/Utils/Utils.php diff --git a/src/QUI/ERP/Order/AbstractOrder.php b/src/QUI/ERP/Order/AbstractOrder.php index 0a36236c856c6d3b9067b213dbaa756f5c65796f..c3a3f472fa83b1349cac6a1bec61f84c6632f346 100644 --- a/src/QUI/ERP/Order/AbstractOrder.php +++ b/src/QUI/ERP/Order/AbstractOrder.php @@ -609,7 +609,7 @@ public function recalculate($Basket = null): void * * @param QUI\Interfaces\Users\User|null $PermissionUser - optional, permission user, default = session user */ - abstract public function clear(QUI\Interfaces\Users\User $PermissionUser = null); + abstract public function clear(null | QUI\Interfaces\Users\User $PermissionUser = null); /** * Refresh the order data @@ -623,14 +623,14 @@ abstract public function refresh(); * @param QUI\Interfaces\Users\User|null $PermissionUser - optional, permission user, default = session user * @throws QUI\Exception */ - abstract public function update(QUI\Interfaces\Users\User $PermissionUser = null); + abstract public function update(null | QUI\Interfaces\Users\User $PermissionUser = null); /** * Delete the order * * @param QUI\Interfaces\Users\User|null $PermissionUser - optional, permission user, default = session user */ - abstract public function delete(QUI\Interfaces\Users\User $PermissionUser = null); + abstract public function delete(null | QUI\Interfaces\Users\User $PermissionUser = null); /** * Is the order posted / submitted diff --git a/src/QUI/ERP/Order/Order.php b/src/QUI/ERP/Order/Order.php index f3ec75f66dc16b8267a6815087494d25e30f2f63..f0fb2e489d556ebf6e5e390ff6c99a17ae1e6797 100644 --- a/src/QUI/ERP/Order/Order.php +++ b/src/QUI/ERP/Order/Order.php @@ -90,7 +90,7 @@ public function refresh(): void * @throws QUI\Exception * @throws QUI\ERP\Accounting\Invoice\Exception */ - public function getInvoice(): QUI\ERP\Accounting\Invoice\Invoice|QUI\ERP\Accounting\Invoice\InvoiceTemporary + public function getInvoice(): QUI\ERP\Accounting\Invoice\Invoice | QUI\ERP\Accounting\Invoice\InvoiceTemporary { if (!Settings::getInstance()->isInvoiceInstalled()) { throw new QUI\Exception([ @@ -140,8 +140,8 @@ public function getView(): OrderView * @throws QUI\Exception */ public function createInvoice( - QUI\Interfaces\Users\User $PermissionUser = null - ): QUI\ERP\Accounting\Invoice\Invoice|QUI\ERP\Accounting\Invoice\InvoiceTemporary { + null | QUI\Interfaces\Users\User $PermissionUser = null + ): QUI\ERP\Accounting\Invoice\Invoice | QUI\ERP\Accounting\Invoice\InvoiceTemporary { if (Settings::getInstance()->forceCreateInvoice() === false && $this->isPosted()) { return $this->getInvoice(); } @@ -504,7 +504,7 @@ public function hasInvoice(): bool * @throws QUI\Exception * @deprecated use createInvoice */ - public function post(): Invoice|InvoiceTemporary + public function post(): Invoice | InvoiceTemporary { return $this->createInvoice(QUI::getUsers()->getSystemUser()); } @@ -996,8 +996,8 @@ public function delete($PermissionUser = null): void * @throws Exception */ public function copy( - QUI\Interfaces\Users\User $PermissionUser = null, - bool|string $globalProcessId = false + null | QUI\Interfaces\Users\User $PermissionUser = null, + bool | string $globalProcessId = false ): Order { $NewOrder = Factory::getInstance()->create(); diff --git a/src/QUI/ERP/Order/OrderInProcess.php b/src/QUI/ERP/Order/OrderInProcess.php index 614bb0d4c57d3f2f7ecee743ba33c6046f3bd124..f654ccdd4db5a87e741821e54dec778fd2c68788 100644 --- a/src/QUI/ERP/Order/OrderInProcess.php +++ b/src/QUI/ERP/Order/OrderInProcess.php @@ -27,7 +27,7 @@ */ class OrderInProcess extends AbstractOrder implements OrderInterface, ErpEntityInterface, ErpTransactionsInterface { - protected null|string|int $orderId = null; + protected null | string | int $orderId = null; /** * Order constructor. @@ -97,7 +97,7 @@ public function refresh(): void $this->setDataBaseData($data); } - public function getOrderId(): null|int|string + public function getOrderId(): null | int | string { return $this->orderId; } @@ -130,7 +130,7 @@ public function getPrefixedId(): string * @throws Exception * @throws QUI\Permissions\Exception */ - public function save(QUI\Interfaces\Users\User $PermissionUser = null): void + public function save(null | QUI\Interfaces\Users\User $PermissionUser = null): void { $this->update($PermissionUser); } @@ -141,7 +141,7 @@ public function save(QUI\Interfaces\Users\User $PermissionUser = null): void * @throws QUI\Permissions\Exception * @throws Exception */ - public function update(QUI\Interfaces\Users\User $PermissionUser = null): void + public function update(null | QUI\Interfaces\Users\User $PermissionUser = null): void { if ($this->hasPermissions($PermissionUser) === false) { throw new QUI\Permissions\Exception( @@ -349,7 +349,7 @@ public function calculatePayments(): void * @throws QUI\Permissions\Exception * @throws QUI\Database\Exception */ - public function delete(QUI\Interfaces\Users\User $PermissionUser = null): void + public function delete(null | QUI\Interfaces\Users\User $PermissionUser = null): void { if ($this->hasPermissions($PermissionUser) === false) { throw new QUI\Permissions\Exception( @@ -394,7 +394,7 @@ public function isPosted(): bool * @throws Exception * @throws Exception */ - public function createOrder(QUI\Interfaces\Users\User $PermissionUser = null): Order + public function createOrder(null | QUI\Interfaces\Users\User $PermissionUser = null): Order { QUI\ERP\Debug::getInstance()->log('OrderInProcess:: Create Order'); @@ -571,7 +571,7 @@ public function createOrder(QUI\Interfaces\Users\User $PermissionUser = null): O * @param null|QUI\Interfaces\Users\User $PermissionUser * @return bool */ - protected function hasPermissions(QUI\Interfaces\Users\User $PermissionUser = null): bool + protected function hasPermissions(null | QUI\Interfaces\Users\User $PermissionUser = null): bool { if ($PermissionUser === null) { $PermissionUser = QUI::getUserBySession(); @@ -691,7 +691,7 @@ protected function getDataForSaving(): array * @throws Exception * @throws QUI\ExceptionStack */ - public function clear($PermissionUser = null): void + public function clear(null | QUI\Interfaces\Users\User $PermissionUser = null): void { if ($PermissionUser === null) { $PermissionUser = QUI::getUserBySession(); @@ -761,7 +761,7 @@ public function hasInvoice(): bool * @throws Exception * @throws QUI\ERP\Accounting\Invoice\Exception */ - public function getInvoice(): QUI\ERP\Accounting\Invoice\Invoice|QUI\ERP\Accounting\Invoice\InvoiceTemporary + public function getInvoice(): QUI\ERP\Accounting\Invoice\Invoice | QUI\ERP\Accounting\Invoice\InvoiceTemporary { if ($this->orderId) { $Order = Handler::getInstance()->get($this->getOrderId()); diff --git a/src/QUI/ERP/Order/OrderView.php b/src/QUI/ERP/Order/OrderView.php index 74ad892503995e3e5d0846dab5792b501ba6b32f..c0cf446b80336dc477ac820ad8d9375c27610773 100644 --- a/src/QUI/ERP/Order/OrderView.php +++ b/src/QUI/ERP/Order/OrderView.php @@ -177,7 +177,7 @@ public function getCreateDate(): string /** * @return bool|QUI\ERP\Shipping\ShippingStatus\Status */ - public function getShippingStatus(): bool|QUI\ERP\Shipping\ShippingStatus\Status + public function getShippingStatus(): bool | QUI\ERP\Shipping\ShippingStatus\Status { return $this->Order->getShippingStatus(); } @@ -210,7 +210,7 @@ public function getData(): array * @param null|QUI\Locale $Locale * @return string|bool */ - public function getDate(QUI\Locale $Locale = null): string|bool + public function getDate(null | QUI\Locale $Locale = null): string | bool { if ($Locale === null) { $Locale = QUI::getLocale(); @@ -306,7 +306,7 @@ public function getInvoiceAddress(): Address * @throws QUI\Exception * @throws QUI\ERP\Accounting\Invoice\Exception */ - public function getInvoice(): QUI\ERP\Accounting\Invoice\Invoice|QUI\ERP\Accounting\Invoice\InvoiceTemporary + public function getInvoice(): QUI\ERP\Accounting\Invoice\Invoice | QUI\ERP\Accounting\Invoice\InvoiceTemporary { return $this->Order->getInvoice(); } diff --git a/src/QUI/ERP/Order/Output/OutputProviderOrder.php b/src/QUI/ERP/Order/Output/OutputProviderOrder.php index 3dcad38bd7d163d2e4372fe6adcf7352e73f1f42..5e887cff48780aac4cdf55a5dcb41b2e5a3ec601 100644 --- a/src/QUI/ERP/Order/Output/OutputProviderOrder.php +++ b/src/QUI/ERP/Order/Output/OutputProviderOrder.php @@ -57,7 +57,7 @@ public static function getEntityType(): string * @param Locale|null $Locale $Locale (optional) - If ommitted use \QUI::getLocale() * @return string */ - public static function getEntityTypeTitle(Locale $Locale = null): string + public static function getEntityTypeTitle(null | Locale $Locale = null): string { if (empty($Locale)) { $Locale = QUI::getLocale(); @@ -74,7 +74,7 @@ public static function getEntityTypeTitle(Locale $Locale = null): string * * @throws QUI\Exception */ - public static function getEntity(int|string $entityId): OrderInProcess|Order + public static function getEntity(int | string $entityId): OrderInProcess | Order { try { $Order = QUI\ERP\Order\Handler::getInstance()->get($entityId); @@ -93,7 +93,7 @@ public static function getEntity(int|string $entityId): OrderInProcess|Order * * @throws QUI\Exception */ - public static function getDownloadFileName(int|string $entityId): string + public static function getDownloadFileName(int | string $entityId): string { return self::getEntity($entityId)->getPrefixedNumber(); } @@ -106,7 +106,7 @@ public static function getDownloadFileName(int|string $entityId): string * * @throws QUI\Exception */ - public static function getLocale(int|string $entityId): Locale + public static function getLocale(int | string $entityId): Locale { $Order = self::getEntity($entityId); $Customer = $Order->getCustomer(); @@ -121,7 +121,7 @@ public static function getLocale(int|string $entityId): Locale * @return array * @throws QUI\Exception */ - public static function getTemplateData(int|string $entityId): array + public static function getTemplateData(int | string $entityId): array { $Order = self::getEntity($entityId); $OrderView = $Order->getView(); @@ -202,7 +202,7 @@ public static function getTemplateData(int|string $entityId): array * @param User $User * @return bool */ - public static function hasDownloadPermission(int|string $entityId, User $User): bool + public static function hasDownloadPermission(int | string $entityId, User $User): bool { if (!QUI::getUsers()->isAuth($User) || QUI::getUsers()->isNobodyUser($User)) { return false; @@ -227,7 +227,7 @@ public static function hasDownloadPermission(int|string $entityId, User $User): * * @throws QUI\Exception */ - public static function getEmailAddress(int|string $entityId): bool|string + public static function getEmailAddress(int | string $entityId): bool | string { $Customer = self::getEntity($entityId)->getCustomer(); @@ -246,7 +246,7 @@ public static function getEmailAddress(int|string $entityId): bool|string * * @throws QUI\Exception */ - public static function getMailSubject(int|string $entityId): string + public static function getMailSubject(int | string $entityId): string { $Order = self::getEntity($entityId); $Customer = $Order->getCustomer(); @@ -266,7 +266,7 @@ public static function getMailSubject(int|string $entityId): string * * @throws QUI\Exception */ - public static function getMailBody(int|string $entityId): string + public static function getMailBody(int | string $entityId): string { $Order = self::getEntity($entityId); $Customer = $Order->getCustomer(); @@ -418,7 +418,7 @@ public static function getCustomerVariables(QUI\ERP\User $Customer): array * @param $date * @return false|string */ - public static function dateFormat($date): bool|string + public static function dateFormat($date): bool | string { // date $localeCode = QUI::getLocale()->getLocalesByLang( @@ -446,7 +446,7 @@ public static function dateFormat($date): bool|string * @param Order $Order * @return string|false - Raw <img> "src" attribute with base64 image data or false if code can or must not be generated. */ - protected static function getEpcQrCodeImageImgSrc(Order $Order): bool|string + protected static function getEpcQrCodeImageImgSrc(Order $Order): bool | string { try { // Check currency (must be EUR) @@ -474,7 +474,9 @@ protected static function getEpcQrCodeImageImgSrc(Order $Order): bool|string // Prefer bank account set in SEPA module if available - if (class_exists('QUI\ERP\Payments\SEPA\Provider') && QUI::getPackageManager()->isInstalled('quiqqer/payment-sepa')) { + if (class_exists('QUI\ERP\Payments\SEPA\Provider') && QUI::getPackageManager()->isInstalled( + 'quiqqer/payment-sepa' + )) { $creditorBankAccount = QUI\ERP\Payments\SEPA\Provider::getCreditorBankAccount(); } else { $creditorBankAccount = BankAccounts::getCompanyBankAccount(); diff --git a/src/QUI/ERP/Order/Search.php b/src/QUI/ERP/Order/Search.php index c9761658267940f704c23b110f22b44d0fb88570..49e8269fe323afc09fb59e84acbcbfe737683a9c 100644 --- a/src/QUI/ERP/Order/Search.php +++ b/src/QUI/ERP/Order/Search.php @@ -44,7 +44,7 @@ class Search extends Singleton /** * @var array|bool */ - protected array|bool $limit = [0, 20]; + protected array | bool $limit = [0, 20]; /** * @var string @@ -78,7 +78,7 @@ class Search extends Singleton * @param string $filter * @param array|string|null $value */ - public function setFilter(string $filter, array|string|null $value): void + public function setFilter(string $filter, array | string | null $value): void { if ($value === null) { return; @@ -157,7 +157,7 @@ public function clearFilter(): void * @param int|string $from * @param int|string $to */ - public function limit(int|string $from, int|string $to): void + public function limit(int | string $from, int | string $to): void { $this->limit = [(int)$from, (int)$to]; } diff --git a/src/QUI/ERP/Order/Utils/DataLayer.php b/src/QUI/ERP/Order/Utils/DataLayer.php index eee4e1c194c2897f167c1f3c23de261e36ef58b1..6759f73ec41a5731029505619526fef1bf8955b8 100644 --- a/src/QUI/ERP/Order/Utils/DataLayer.php +++ b/src/QUI/ERP/Order/Utils/DataLayer.php @@ -77,7 +77,7 @@ public static function parseProduct(Product $Product, $Locale = null): array return $product; } - public static function parseArticle(QUI\ERP\Accounting\Article $Article, QUI\Locale $Locale = null): array + public static function parseArticle(QUI\ERP\Accounting\Article $Article, null | QUI\Locale $Locale = null): array { try { $Product = Products::getProduct($Article->getId()); @@ -104,7 +104,7 @@ public static function parseArticle(QUI\ERP\Accounting\Article $Article, QUI\Loc return $item; } - public static function parseOrder(QUI\ERP\Order\OrderInterface $Order, QUI\Locale $Locale = null): array + public static function parseOrder(QUI\ERP\Order\OrderInterface $Order, null | QUI\Locale $Locale = null): array { $calculations = $Order->getArticles()->getCalculations(); $tax = 0; diff --git a/src/QUI/ERP/Order/Utils/Utils.php b/src/QUI/ERP/Order/Utils/Utils.php index fefe6376888d11c014991863db06a60f48ea8647..c972f67e0e1d1f55994f5fdfad2144e9eecfa342 100644 --- a/src/QUI/ERP/Order/Utils/Utils.php +++ b/src/QUI/ERP/Order/Utils/Utils.php @@ -278,7 +278,7 @@ public static function isPaymentChangeable( public static function importProductsToBasketList( QUI\ERP\Products\Product\ProductList $List, array $products = [], - QUI\ERP\Order\AbstractOrder|QUI\ERP\Order\Basket\Basket $Order = null + null | QUI\ERP\Order\AbstractOrder | QUI\ERP\Order\Basket\Basket $Order = null ): QUI\ERP\Products\Product\ProductList { if (!is_array($products)) { $products = [];