# 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
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* Qual: Update selectDate '' arguments h, m and empty to match PHPdoc (set to 0)
* New: Fixer for selectDate '' arguments h, m and empty
* Qual: Update codespell exceptions
# Fix: PhanPossiblyUnsetPropertyOfThis - variable is unset
Because the variable is unset to force recomputation, the Phan message
is valid and the if condition is always true.
Hence, the if condition was commented.
Also added an initialisation to an empty array before assigning array fields.
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* 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>
# Fix typing for showOutputFieldForObject
Type hint that $value can also be a list of strings.
Also updated the "else-if" sequence so that a static tool checker can
still appropriately detect when $value is a string and when it is
a list of strings so that it provides correct feedback.
Added an error message to the syslog in case we got an array but not
"array" as the value for "$type"
* 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()
htdocs/loan/class/paymentloan.class.php 155 Property PaymentLoan::$num_payment (string) does not accept int.
htdocs/loan/class/paymentloan.class.php 317 Property PaymentLoan::$num_payment (string) does not accept int.
* Added address, zip & town
* Added state & country
* Added phone, email, max_users & url
* Added link formatting. Cleaned code.
* Updated EN & FR localization
* Added country select list
* Cleaned code