# Fix: Ob buffer cleanup on exception
The OB buffer capture was incorrectly cleaned up on exception.
This fixes that.
Also modified the SecurityTest to enable running it standalone
* 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
* Qual: Add typing to fix PhanTypeMismatchDimAssignment notice
* Fix: Initialise array for code in somme
* Qual: Update type hint for argument in _Set_Format
* Qual: Update type hint for childtables
* Qual: Add typing to attributes
* Qual: Add typing for _msgContent
* Qual: Suppress PhanTypeMismatchDimAssignment
* Qual: Add typing for liste
* Qual: Add typing to fields
* Qual: Add typing hint for $objMod
* Qual: Modify assignment of array with bool keys for phan typing
Demonstration:
```
php -r '$a=[true=>"yes",false=>"no"];var_dump($a);'
# Result demonstrates bool keys are converted to int.
Command line code:1:
array(2) {
[1] =>
string(3) "yes"
[0] =>
string(2) "no"
}
```
* Qual: Add typing hint to indicate value is not null
* Force non-null type on $paramname
* Qual: Add typing hint to getCats()
* Update inc.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Qual: Add check on addExtraField type argument
# Qual: Add check on addExtraField type argument
Added a check on the type argument for addExtraField
* Qual: Update phan ignore with more specific name
# Fix: Correctly close active output buffer.
Use ob_get_clean(), not ob_get_contents() and ob_clean().
Tests were failing with:
FunctionsLibTest::testVerifCond with data set "Test that verifConf("0") returns false" ('0', false)
Test code or tested code did not (only) close its own output buffers
OK, but incomplete, skipped, or risky tests\!
Also refactored a test case to use a data provider which helped identify that it was related
to dol_eval.
* Qual: Improve typing hint for (ext)Object, and allow null
# Qual: Improve typing hint for object, and allow null
As the key "->element" is expected, the object type should be derived from CommonObject.
Also extObject can be nullable
* Fix: Use null instead of 0 for extObject in call to Form::editfieldval()
* Fix: Use null instead of 0 for extObject in call to Form::editfieldval()
* Fix: Use null instead of 0 for extObject in call to Form::editfieldval()
* Fix: Use null instead of 0 for extObject in call to Form::editfieldval()
* Fix: Use null instead of 0 for extObject in call to Form::editfieldval()
* Fix: Use null instead of 0 for extObject in call to Form::editfieldval()
* Fix: Use null instead of 0 for extObject in call to Form::editfieldval()
# Qual: PhanCompatibleNegativeStringOffset must be suppressed
Apparently the PhanCompatibleNegativeStringOffset notice can not be avoided
through the '>=1' condition hint, so suppress it explicitly
* Verifcation of variables
Modification of the variable setting before its use.
* To check if the property exists
* Modification as per @frederic34 suggestion
* Update propal.class.php
* Application of coding rules
Modification of the called function.
* Verification of variables
* Verification of variable
* Typo error
* Update actions_sendmails.inc.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Qual: Ignore some false positives for deprecated functions
# Qual: Ignore some false positives for deprecated functions
The Phan Deprecation Plugin for internal functions has mixed up some
mail functions and lists them as deprecated, this ignores that
* Qual: Enable detection and fixing of internal deprecations
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Replace 'join' with 'implode'
* Qual: Update codespell lines ignore list after format
# Qual: Update codespell lines ignore list after forma
Done using latest library, so also adds some exceptions that are needed
in the future;
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: $form argument to price() must be int
# Fix: $form argument to price() must be int
Changed '' for $form into 0
* Fix: PHPDoc annotations in unappropriate comment
# Fix: PHPDoc annotations in unappropriate comment
PHPDoc annotations need to be in /** */ or // comments.
Fixed that (change type, move comment, add suppress directive)
* Fix: PHPDoc annotations in unappropriate comment
# Fix: PHPDoc annotations in unappropriate comment
PHPDoc annotations need to be in /** */ or // comments.
Fixed that (change type, move comment, add suppress directive)
* Fix: PHPDoc annotations in unappropriate comment
# Fix: PHPDoc annotations in unappropriate comment
PHPDoc annotations need to be in /** */ or // comments.
Fixed that (change type, move comment, add suppress directive)
* Fix: PHPDoc annotations in unappropriate comment
# Fix: PHPDoc annotations in unappropriate comment
PHPDoc annotations need to be in /** */ or // comments.
Fixed that (change type, move comment, add suppress directive)
* Update dolreceiptprinter.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
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()
* NEW - See the documents of my subordinates
* cop
* Rewriting
* up
* ok
* FIX - Restriction on sale representative
---------
Co-authored-by: Anthony Berton <anthony.berton@bb2a.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>