fix(phpstan): improved method validity checks and reduced error handling
This commit fixes several issues in different PHP files. - Added `method_exists` checks for `isActive` method in `activate.php`, `deactivate.php` and `toggle.php` to prevent calls to an undefined method. - Similar check added for `getTitle` method in `get.php`. - Fixed sorting functionality in `search.php` by using `strcmp` instead of greater than comparison. - Removed a large number of ignored errors in `phpstan-baseline.neon`, indicating reduced error handling. - Corrected the `implode` parameters order in `Discount.php` and typecasted variable to string before using `explode` in `PriceFactor.php`. - Updated `getTitle` & `toPriceFactor` method parameters in `Discount.php` to use union types for compatibility with different data types. Related: #18
Übergeordneter
000c2bb1
No related branches found
No related tags found
- ajax/activate.php 1 Ergänzung, 1 Löschungajax/activate.php
- ajax/deactivate.php 1 Ergänzung, 1 Löschungajax/deactivate.php
- ajax/get.php 1 Ergänzung, 1 Löschungajax/get.php
- ajax/search.php 1 Ergänzung, 1 Löschungajax/search.php
- ajax/toggle.php 4 Ergänzungen, 0 Löschungenajax/toggle.php
- phpstan-baseline.neon 1 Ergänzung, 45 Löschungenphpstan-baseline.neon
- src/QUI/ERP/Discount/Discount.php 3 Ergänzungen, 3 Löschungensrc/QUI/ERP/Discount/Discount.php
- src/QUI/ERP/Discount/PriceFactor.php 1 Ergänzung, 1 Löschungsrc/QUI/ERP/Discount/PriceFactor.php
Bitte registrieren oder Anmelden zum Kommentieren