fix(phpstan): improved method validity checks and reduced error handling
This commit fixes several issues in different PHP files.
- Added
method_exists
checks forisActive
method inactivate.php
,deactivate.php
andtoggle.php
to prevent calls to an undefined method. - Similar check added for
getTitle
method inget.php
. - Fixed sorting functionality in
search.php
by usingstrcmp
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 inDiscount.php
and typecasted variable to string before usingexplode
inPriceFactor.php
. - Updated
getTitle
&toPriceFactor
method parameters inDiscount.php
to use union types for compatibility with different data types.
Related: #18 (closed)