PHPStan Level 1 Errors
Wie gemeinsam besprochen, sollen in allen wichtigen QUIQQER Paketen die PHPStan Fehler bis inklusive Level 1 behoben werden.
In diesem Paket gibt es die folgenden Errors auf dem dev
-Branch:
------ -------------------------------------------------------------------------------------------------------------
Line ajax/products/getNextArticleNo.php
------ -------------------------------------------------------------------------------------------------------------
18 Static method QUI\ERP\Products\Handler\Products::generateArticleNo() invoked with 0 parameters, 1 required.
------ -------------------------------------------------------------------------------------------------------------
------ --------------------------------------------------
Line ajax/products/variant/getVariants.php
------ --------------------------------------------------
162 Variable $defaultVariantId might not be defined.
163 Variable $Currency might not be defined.
------ --------------------------------------------------
------ -----------------------------------------------------------------
Line ajax/search/backend/executeForGrid.php
------ -----------------------------------------------------------------
74 Variable $productIds in empty() always exists and is not falsy.
------ -----------------------------------------------------------------
------ -------------------------------------------------------------------------------------------------
Line src/QUI/ERP/Products/Category/AllProducts.php
------ -------------------------------------------------------------------------------------------------
26 Constructor of class QUI\ERP\Products\Category\AllProducts has an unused parameter $categoryId.
------ -------------------------------------------------------------------------------------------------
------ -----------------------------------------------------------------------------------------------------------
Line src/QUI/ERP/Products/Controls/Products/Product.php
------ -----------------------------------------------------------------------------------------------------------
334 Parameter $Collector of anonymous function has invalid type quiqqer\smarty4\src\Quiqqer\Engine\Collector.
parameters:
------ -----------------------------------------------------------------------------------------------------------
------ -----------------------------------------
Line src/QUI/ERP/Products/Crons.php
------ -----------------------------------------
58 Variable $Product might not be defined.
------ -----------------------------------------
------ -----------------------------------------------------------------
Line src/QUI/ERP/Products/Handler/Fields.php
------ -----------------------------------------------------------------
828 Variable $fieldTypes in empty() always exists and is not falsy.
------ -----------------------------------------------------------------
------ -----------------------------------------------
Line src/QUI/ERP/Products/Product/JsonLd.php
------ -----------------------------------------------
266 Variable $prices in isset() is never defined.
266 Variable $prices in isset() is never defined.
------ -----------------------------------------------
------ ------------------------------------------
Line src/QUI/ERP/Products/Product/Model.php
------ ------------------------------------------
1726 Variable $Category might not be defined.
------ ------------------------------------------
------ -------------------------------------------------------------
Line src/QUI/ERP/Products/Product/Types/VariantChild.php
------ -------------------------------------------------------------
74 Variable $Parent in empty() always exists and is not falsy.
------ -------------------------------------------------------------
------ -----------------------------------------------------------
Line src/QUI/ERP/Products/Product/Types/VariantParent.php
------ -----------------------------------------------------------
206 Variable $data in empty() always exists and is not falsy.
------ -----------------------------------------------------------
------ ----------------------------------------------------------------
Line src/QUI/ERP/Products/Utils/Fields.php
------ ----------------------------------------------------------------
65 Variable $fieldHash in empty() always exists and is not falsy.
------ ----------------------------------------------------------------
------ -----------------------------------------------------------------
Line src/QUI/ERP/Products/Utils/Products.php
------ -----------------------------------------------------------------
130 Variable $groups in empty() always exists and is not falsy.
184 Variable $Product in empty() always exists and is always falsy.
188 Variable $Product in empty() always exists and is always falsy.
239 Variable $Product in empty() always exists and is always falsy.
243 Variable $Product in empty() always exists and is always falsy.
------ -----------------------------------------------------------------
-- ---------------------------------------------------------------------------------------------------------------
Error
-- ---------------------------------------------------------------------------------------------------------------
Internal error: Internal error: Class "Threaded" not found while analysing file
/opt/homebrew/var/www/quiqqer-cc/packages/quiqqer/products/src/QUI/ERP/Products/Product/Cache/CacheThread.php
Run PHPStan with -v option and post the stack trace to:
https://github.com/phpstan/phpstan/issues/new?template=Bug_report.yaml
Child process error (exit code 1):
-- ---------------------------------------------------------------------------------------------------------------
[ERROR] Found 21 errors