# Qual: Update fields phpdoc to include fields that are defined/used in some cases
comment, copytoclipboard, autofocusoncreated are documented and used in some cases for the
$fields definition
* Qual: Enable & fix or ignore Invalid DimOffset
# Qual: Enable & fix or ignore Invalid DimOffset
The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.
This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later
* Nullable object typing in function signature not ok for 7.0/8.4
Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Qual: Fix PhanTypeMismatchProperty and some other phan notices
* Qual: Phan fixes for BOM
* Phan - fix fields
* fixup! Qual: Phan fixes for BOM
* Fix phpstan double array keys for syslog
* Fix $fields phpdoc
* Fix phan typing issues with intermediate var and ??
* Fix phan typing issue with ?? operator
* Ignore htdocs/install/install.forced.php for git
* Qual: Revert to original code, ignore notice
When changing the method to avoid one notice type, another one
appears. So simply ignoring this error.
* Qual: Revert to original code, ignore notice
When changing the method to avoid one notice type, another one
appears. So simply ignoring this error.
* Update baseline
* Qual: Phan fixes for BOM
* fixup! Qual: Phan fixes for BOM
* Fix phpstan double array keys for syslog
* Qual: Revert to original code, ignore notice
When changing the method to avoid one notice type, another one
appears. So simply ignoring this error.
* Ignore PhanTypeSuspiciousNonTraversableForeach to allow integration
* Fix typing hints (phpstan)
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Qual: Update phan baseline
* Init variable to ensure it is defined
* Init $module_part to ensure it is defined
* Init $modulepart to ensure it is defined
* phpdoc typing for getNetNeeds and getNetNeedsTree
* Enforce type for phan
* Initialise $massactionbutton so that it is defined
* phpdoc: improve typing
* Encore character_set value is string (for typing)
* fixup! Qual: Update phan baseline
* Fix duplicate code
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
# Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions
Fix occurences of PhanPluginDuplicateIfStatements which are if statements where the
consecutive branches execute the same code, making it useles to test the condition
* Fix: False positive for PhanTypeMismatchArgumentInternalProbablyReal
* Qual: phan: suppress false positive on ssl_set
* Qual: Enable PhanTypeMismatchArgumentInternalProbablyReal
# Qual: Enable PhanTypeMismatchArgumentInternalProbablyReal
PhanTypeMismatchArgumentInternalProbablyReal are fixed and reporting can
be enabled.
* Qual: Fix PhanTypeMismatchArgumentInternalProbablyReal by improving typing
* Qual: Rewrite/optimize to fix PhanTypeMismatchArgumentInternalProbablyReal
# Qual: Rewrite/optimize to fix PhanTypeMismatchArgumentInternalProbablyReal
False positive detecting that is not an int, rewriting to check
impact
PHPDoc update to reflect what the code does today.
This update however doesn't solve this PHPStan warning:
htdocs/core/db/mysqli.class.php 243 Return type (mysqli|null) of method DoliDBMysqli::connect() should be compatible with return type (resource) of method Database::connect()