Commit Graph

2646 Commits

Author SHA1 Message Date
MDW
cc239ce866
Qual: Enable phan notices regarding array definitions (#30751)
# Qual: Enable phan notices regarding array definitions

This configuration change in phan will report NEW array types in phpdoc
that are not specific about the array members.
At level 6, phpstan also expects this.

The exceptions in baseline.txt ensure this is only reported on new files
or files were these missing typing directives are already fixed.
2024-08-27 04:55:42 +02:00
MDW
f5c7ca1769
Qual: Fix PhanPluginUnknownObjectMethodCall in classes with high occurence (#30754)
* Qual: Fix PhanPluginUnknownObjectMethodCall in import.php

* Qual: PHPDoc for import/export array types

* Qual: Add PHPDoc types to import.class.php

* Fix PhanPluginUnknownObjectMethodCall in stats.class.php

* Add methods expected on ModeleImport child classes

* Force imapemail type for phan

* Qual: Update phan baseline

* Qual: Fix Undefined/Undeclared phan notices in module_help

* Update baseline
2024-08-27 04:51:41 +02:00
MDW
ca414de526
Qual: Fix $fields related notices with Phan (#30704)
* Qual: Typing hints/ignore directives for phan notices

* Update field typing
2024-08-21 13:23:35 +02:00
Mohamed DAOUD
563fbb67ca
add restricthtmlallowlinkscript to phan config (#30709) 2024-08-21 13:13:35 +02:00
MDW
16e72b4602
Qual: Fix phan notices for fournisseur.facture.class.php (#30680)
# Qual: Fix phan notices for fournisseur.facture.class.php

Fix phan notices in one of the popular classes to improve future detection.
2024-08-20 12:29:16 +02:00
MDW
d71cd352d5
Qual: Fix PhanUndeclaredMethod (#30661)
* Qual: Fix PhanUndeclaredMethod cases

* Fix PhanUndeclaredMethod cases

* Qual: Remove PhanUndeclaredMethod exceptions

* Fix spelling "disacard"

* Improve phpdoc, add abstract method to trait for typing

* Improve phpdoc typing for PHanUndeclaredMethod

* Suppress phan notices for guarded AliasNbPages calls

* Fix return value for printFile stub

* Fix getting message from Exception

* Define dummy getAllByProducts(), typing for it.

* Fix typo in comment

* Qual: Better typing for apiService (phan)

* Test that the Generic OAuth Service is provided

* Qual: Fix getSqlArrayForStats typing

* Force modTcpdfbarcode

* Correct typing hint

* Set ModelePDFAsset typehint

* Fix ModelePDFUserGroup typing hint

* Fix phan typing hints htdocs/core/modules/printing/printgcp.modules.php

* Fix write_file in ModelePDFStock*

* Update printsheet.php

* Adjust typing hint for barcode generator

* Update printsheet.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-19 02:05:27 +02:00
MDW
b0087aaf61
Qual: Enable phan on modulebuilder (#30652)
* Allow null for buyer, and force '' for  in printObjectLine(s)

* Allow null for Contact in show_actions_done

* Qual: Enable phan on modulebuilder

# Qual: Enable phan on modulebuilder

Most files of the modulebuilder template can be checked as regular files.
It will help improve the template

* Update baseline (enable modulebuilder notices)

* Add properties that are expected to exist on modules_boxes

* Qual: Ignore false positive (phan)

* Set phpdoc type to include null on formAddObjectLine

* Qual: Fixes for modulebuilder (phan, phpstan, bugs, format)

* Fix phpcs for intracom

* Make ModeleBoxes:showBox() signature match child class's

* Fix *box::showBox() phpdoc types

* Update index.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-18 18:16:08 +02:00
Laurent Destailleur
3114d1d13e Clean code 2024-08-17 23:46:16 +02:00
Laurent Destailleur
30a8bd6bd5 Add entry in ignore 2024-08-17 23:40:08 +02:00
MDW
75ed925f06
Qual: Fix PhanPluginUnknownObjectMethodCall ("part 1") (#30563)
* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add typing hint to fix phan notice.

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add typing hint in phan config to fix phan notice.

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint to fix phan notice.

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for linkedObjectBlock

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for linkedObjectBlock

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for linkedObjects

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Fix: MemberNumRefNumbers getExample does not take any arguments

Found thanks to adding the typing for phan!

* Qual: Correct forced type for $module

* Qual: Ignore phan false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Ignore false positive

* Qual: phan/Ignore false positive, replace depr.prop with method

* Qual: Fix typing for count by adding is_array check

* Qual: replace depr.prop `nom` with method

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Fix depr.prop with getter and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: Improve typing for mymodule template

* Make info method arguments match calls

* Make PrintingDriver abstract class because we added abstract methods

* Add phpdoc typing for phan

* Update getExample function signature for compatibility

* Update getExample function signature for compatibility

* Update getExample function signature for compatibility

* Update header wit correct information

* Update getExample method signature

* Update getExample method signature

* Correct reference to class in comment

* Force php phan typing for numbering modules

* Correct $_GLOBALS to $GLOBALS

* Add phpdoc to indicat type of properties

* Correct default to null

* Improve getNextValue typehint

* Improve getNextValue typehint

* Qual: Improve ModeleNumRefTakepos typing

* Qual: Improve ModeleNumRefRecruitmentJobPosition typing

* Fix default for $langs

* Do not use non-existing ModeleNumRefTakepos::nom

* Allow getNextValue argument to be null

* Correct $_GLOBAL into $GLOBALS

* Improve typing for ldap functions

* Allow null for outputlangs argument

* Improve typing for printOriginLine

* Improve typing for linkedObject access

* Fix PhanTypeMismatchArgumentNullableInternal and optimize

* Fix PhanPossiblyUndeclaredVariable by setting default value

* Ignore PhanPluginDuplicateExpressionAssignmentOperation - needs PHP7.4

* getToolTip does not accept null, changed to ''

* Improve getNextValue typing

* Change PrintingDriver back to normal class (instantiated)

And add errors for functions that should be overloaded

* Adjust pringOriginLine typing to match parent

* Fix phpdoc for getNextValue

* Fix phan typing

* Add/Improve phpdoc typing hints

* Qual: Adjustments to match typing

* Update typing for unit, use GETPOSTINT

* ModeleNumRefTask needs Project

* Fix several notices appearing after update from develop

* Index for choices is int, use GETPOSTINT

* Qual: Ignore empty foreach

* Force BOMLine on object line

* phan typing to indicate that linked objects are BOM

* Type the correct variable name (phan)

* Add typing for $langs

* Type to CommonNumRefGenerator (no class for availabilities)

* Resolve several phan notices after update from dev branch

* Extra typing fixes

* Move common attributes to parent class (phan)

* Add typing to Calendar class

* Improve typing hints

* Add typing to pdf_eagle_proforma

* Qual: Add typing for token in generic_oauthcallback.php

* Add typing for objMod

* Correct getNextValue function signature (phpstan)

* Fix typing (phpstan)

* Update version declarations (fix phpstan)

* Fix phpstan typing issues

* Adjust typing (phpstan)

* Qual: Update baseline & conf to detect 25% of PhanPluginUnknownObjectMethodCall
2024-08-17 19:32:52 +02:00
Laurent Destailleur
b436ffeaae Fix link image 2024-08-17 14:10:10 +02:00
Laurent Destailleur
6249268e98 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-16 22:28:43 +02:00
Laurent Destailleur
ad7201c368 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-08-16 22:27:53 +02:00
Laurent Destailleur
77ea24c812 Try fix codespell 2024-08-16 22:23:52 +02:00
Laurent Destailleur
ab2bfae576 Fix precommit 2024-08-16 22:20:44 +02:00
MDW
85ce1c3364
Qual: Ignore htdocs/custom/mymodule in cti/apstats (#30647)
# Qual: Ignore htdocs/custom/mymodule in cti/apstats

Fix #30551 where '../core/...' was added instead of '.../custom/...'.
2024-08-16 20:14:22 +02:00
MDW
54880f92cd
Qual: Fix PhanTypeMismatchProperty and some other phan notices (#30542)
* 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>
2024-08-15 17:05:00 +02:00
MDW
203cbb7023
Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp (#30557)
* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Update phan baseline (remove PhanTypeInvalidLeftOperandOfNumericOp)

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Fix: Change argument '' to null as by getAvailableDiscounts signature

* Qual: Cast '' to float for Phan notice

* Fix: Convert $number with price2num before using this parameter

* Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

# Qual: Fix PhanTypeInvalidLeftOperandOfNumericOp

These changes ensure that the left operand is a numeric value

* Add cast to ensure fmod is presented with floats
2024-08-15 16:57:02 +02:00
Laurent Destailleur
b7e1affecf Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-15 16:18:00 +02:00
Laurent Destailleur
8d778a411d Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-08-15 16:16:42 +02:00
Laurent Destailleur
7f832c6767 Doc 2024-08-15 16:10:13 +02:00
Laurent Destailleur
13cba86eff Fix corrupted pdf 2024-08-15 15:25:05 +02:00
Laurent Destailleur
543f97f92e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-15 15:24:20 +02:00
Laurent Destailleur
9d1ae6dd8c Update dir of resources 2024-08-15 15:23:27 +02:00
Laurent Destailleur
166f04bddf Typo 2024-08-15 15:17:14 +02:00
MDW
3d04a7195c
Qual: Updates regarding write_file(s) methods for Phan (#30511)
* Fix phpdoc for phpstan

* Add abstract write_file to ModelePDFContract

And update phpdoc for derived classes

* Fix typing for php_standard_actions writefile

* Improve phpdoc for write_files (& related)

* Add abstract write_file to ModelePDFBom

* Add abstract write_file to ModelePDFDeliveryOrder

* Add abstract write_file to ModeleExpenseReport

* Add abstract write_file to ModelePDFFicheinter

* Add abstract write_file to ModelePDFEvaluation

* Add abstract write_file to ModelePDFFactures

* Add abstract write_file to ModelePDFSuppliersInvoices

* Update ModelePDFProjects and ModelePDFTask related classes

* Qual: Add abstract write_file to ModelePdfExpedition

And update phpdoc for derived classes

* Qual: Correct reference (doc) to ModelePDFEvaluation

* Qual: Add abstract write_file to ModelePDFKnowledgeRecord

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFMo & ModelePDFMouvement

And update phpdoc for derived classes

* Qual: Set typehint to ModelePDFFicheinter

* Qual: Add abstract write_file to ModelePDFCommandes

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFPropales

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePdfReception

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFSuppliersOrders

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFSuppliersOrders

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFSuppliersPayments

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFSupplierProposal

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFWorkstation

And update phpdoc for derived classes

* Set typing for doc generator (commonobject)

* Improve typing for write_file

* Set typing for doc generator

* Qual: Add abstract write_file to ModelePDFMember

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFProduct

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFProductBatch

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFRecruitmentJobPosition

And update phpdoc for derived classes

* Add abstract write_file to ModelePDFTicket

* Add abstract write_file to ModelePDFUser

* Add abstract write_file to ModelePDFUserGroup

* Add abstract write_file to ModeleThirdPartyDoc

* Add abstract write_file to ModelePDFAsset

* Find all incompatible classes

* Qual: update phan baseline

* Set typing for doc generator (commonobject)

* Qual: update phan baseline

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-14 19:21:10 +02:00
Laurent Destailleur
6f3ae85510 Lang entries have been added 2024-08-14 14:46:38 +02:00
MDW
be0f28245c
Qual: Fix phan notices wrt main.inc.php, menus (#30633)
* Qual: Fix phan notices wrt main.inc.php, menus

# Qual: Fix phan notices wrt main.inc.php, menus

This fixes phan notices stemming from main.inc.php and the menu classes.

* Qual: Fix phpstan notice that dol_authmode always set

# Qual: Fix phpstan notice that dol_authmode always set

dol_authmode is always set because it is now initialised.
2024-08-14 14:05:56 +02:00
MDW
e570f59e2d
Qual: Phan fixes (mainly Initial type cannot be inferred) in popular changed classes (#30604)
* Update setValueFrom $id type to include null

* Only 2 arguments for ModeleNumRefMembers::getToolTip

* Fix PhanTypeConversionFromArray

* Only 6 args for PaymentSalary::addPaymentToBank

* Fix typing hints (array -> string)

* Fix uninitialized variables

* Add cssview to attributes phpdoc

* Avoid double typing specification (Phan notice)

* Qual: Ensure variable is defined (phan)

* Ensure phpdoc typing for verif method

* Ensure phpdoc typing for getNextValue method

* Add status as data key in cols array

* Ensure preg_replace operates on string (phan)

* Correct type for desiredstock

* Fix typing with casts (phan)

* Fix check that notification already exists

* Initialise fk_parent_id to fix typing issue

* Qual: Fix phan notices for Societe & related

* Qual: Fix typing for Facture and related

* Qual: Fix typing for Product & related

* Update baseline

* Fix new phpstan notices
2024-08-14 01:24:55 +02:00
Frédéric FRANCE
32839b138b
fix phpstan level 5 (#30565)
* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phpstan level 5

* fix phan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

fix phpstan

fix phpstan

fix phpstan

* increase level for apstat
2024-08-13 23:16:09 +02:00
Laurent Destailleur
080c1fa41c More log on oauth refresh 2024-08-13 14:23:49 +02:00
Laurent Destailleur
ed73dc6471 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-13 11:59:53 +02:00
MDW
aa49419e8f
Qual: Fix/initial type cannot be inferred (#30591)
* Update baseline

* Add/update phpdoc typings

* Fix type for AssetDepreciationOptions as is

* Fix typing for Asset->depreciation_lines

* $card is used in derived classes, add it back to ActionsAdherentCardCommon

* Adjust code with typing/corrections for defined types

* Fix typos, code update to match typing, extra typing

* Add type cast for numeric operation

* Phpdoc/cast adjustments detected because of new phpdoc hints
2024-08-10 23:21:46 +02:00
MDW
45ed4caeb2
Qual: Enable Phan Simplify rule and fix notices (#30537)
* Qual: Phan - Enable Simplyfy expression

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Qual: Simplify expression (phan notice)

* Update functions2.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-07 03:05:02 +02:00
MDW
8b71242997
Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests (#30544)
* Remove PhanPluginDuplicateExpressionAssignmentOperation from baseline

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* fixup! Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

* Qual: Apply PhanPluginDuplicateExpressionAssignmentOperation as phan suggests

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-07 02:53:45 +02:00
MDW
d6948077b2
Qual: Fix spelling/update .pre-commit configuration (versions) (#30546)
* Qual: Update pre-commit configuration

* Qual: Update spelling

* Ignore use of deprecated constant
2024-08-07 01:20:43 +02:00
MDW
782f968eb7
Qual: Phan: Exclude htdocs/core/mymodule seen in cti.dolibarr.org (#30551)
# Qual: Phan: Exclude htdocs/core/mymodule seen in cti.dolibarr.org

`htdocs/core/mymodule` has notices on https://cti.dolibarr.org
but it is not seen in git.

It would be a good idea to generate a module and include it in the
static analysis on cti, but `htdocs/core/mymodule` is not up-to-date.

If such a generation is done, a better name could be used.
For instance `generatedmymoduleforcti`.
2024-08-07 01:10:12 +02:00
Laurent Destailleur
49f40b58fe Removed some warning (not priority) 2024-08-03 14:02:09 +02:00
MDW
63aab818e6
Qual: Fixes related to CMailFile for phan notices (#30510)
* Qual: Fix CMailFile related phan notices

# Qual: Fix CMailFile related phan notices

Fix several phan notices by typing and typing checks.

* Fix initialisation of CMailFile instantiation

* Update phan baseline

* Update mails_emailing.php

* Update mails_emailing.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-01 11:09:26 +02:00
MDW
5da6995a56
Qual: Update Phan baseline - Fix phpstan regex (#30504)
* Add missing escapes in regex

* Qual: Fix phpstan regex
2024-07-31 18:39:02 +02:00
Laurent Destailleur
b494d26f95 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-25 14:51:48 +02:00
Laurent Destailleur
5c9b808f3f Fix phan 2024-07-25 10:44:43 +02:00
Laurent Destailleur
c21313fc2c Fix phan 2024-07-23 19:19:27 +02:00
Laurent Destailleur
ddaadfdd43 Update doc 2024-07-21 00:38:45 +02:00
Laurent Destailleur
c2c912ff91 Fix codespell 2024-07-13 18:17:58 +02:00
Frédéric FRANCE
38b01c0979
Update codespell-ignore.txt with develop list of words (#30337)
* Update codespell-ignore.txt with develop list of words

* Update codespell-ignore.txt
2024-07-10 18:54:33 +02:00
Frédéric FRANCE
2707475a12
fix phpstan (#30319)
* fix phpstan

* fix phpstan expects int, false given ...

* fix phpstan expects int, true given ...
2024-07-08 21:45:35 +02:00
Frédéric FRANCE
ea416aac93
replace old syntax, rename pdf models with same class name (#30271)
* replace old syntax

* replace old syntax

* replace old syntax

* replace old syntax

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* rename files with same class name

* fix class with same name

* fix class with same name

* clean code
2024-07-06 02:59:40 +02:00
Laurent Destailleur
fa4247a812 More valid rector rules to change conf->global->xxx 2024-07-03 19:35:06 +02:00
Laurent Destailleur
b532e3b0a3 Test 2024-06-30 15:32:18 +02:00
Laurent Destailleur
4ba6b0d2f0 Clean language 2024-06-30 15:26:31 +02:00
Laurent Destailleur
10ecc23df9 Exclude contributor name from spellcheck 2024-06-30 15:20:08 +02:00
Laurent Destailleur
d2318c6874 Test 2024-06-30 15:17:59 +02:00
Laurent Destailleur
3f8a5cd3a5 Ignore spellcheck 2024-06-30 15:16:13 +02:00
Laurent Destailleur
3eae3a70eb Fix error and timezone 2024-06-27 18:08:52 +02:00
Laurent Destailleur
b113a386b5 Add migration to 21 in win ci 2024-06-26 16:50:07 +02:00
Laurent Destailleur
8f5b98be43 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-06-25 13:50:27 +02:00
Laurent Destailleur
92bc6c9102 Eclude some phan warnings 2024-06-25 12:10:47 +02:00
Frédéric FRANCE
4eec08ac84
remove deprecated and copy phan ignore for octopus (#30136) 2024-06-23 19:35:16 +02:00
Frédéric FRANCE
865e6a0878
add phan ignore for octopus branch 20.0 (#30137) 2024-06-23 19:35:02 +02:00
Laurent Destailleur
adb354f97a Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-06-23 14:00:12 +02:00
Laurent Destailleur
62a7c7728b Debug v20 2024-06-23 13:57:35 +02:00
Sylvain Legrand
7c9107acc0
New TCPDF v6.7.5 (#29903)
* New TCPDF v6.7.5

Update TCPDF to the last one

* Fix PHAN

* Fix PHAN
2024-06-22 16:16:11 +02:00
Frédéric FRANCE
d65b370236
fix fichinter card rec (#30130)
* fix fichinter card rec

* fix fichinter card rec

* Update interventions.lang

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-06-22 15:49:31 +02:00
Frédéric FRANCE
0f1ae42691
fix phan (#30113)
* fix phan

* Update project.class.php

* Update project.class.php

* try to fix

* try to fix

* try to fix

* try to fix

* try to fix
2024-06-22 15:36:10 +02:00
Frédéric FRANCE
ec9b48260e
Update baseline.txt (#30127) 2024-06-22 15:30:07 +02:00
Laurent Destailleur
9788caa298 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-06-22 13:01:21 +02:00
Laurent Destailleur
d3316283a3 Prepare v20 2024-06-22 03:09:53 +02:00
Laurent Destailleur
ec25b85e35 Exclude more phan warnings 2024-06-21 17:27:52 +02:00
Laurent Destailleur
64259c9238 Prepare 20.0 2024-06-20 11:45:15 +02:00
Laurent Destailleur
eb537088ba Exclude phan error type that is for the moment too annoying to manage 2024-06-18 19:15:29 +02:00
Laurent Destailleur
ac0ba02036 Exclude false positive 2024-06-16 13:17:10 +02:00
Laurent Destailleur
6e262ba185 Doc 2024-06-16 12:59:35 +02:00
Laurent Destailleur
53222914ec Doc 2024-06-12 01:44:19 +02:00
Laurent Destailleur
ec42ad7804 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-06-12 00:46:02 +02:00
Laurent Destailleur
da577e8a24 Debug look and feel v20 2024-06-12 00:45:23 +02:00
Frédéric FRANCE
7d300e0b4b
Token csrf level 3 (#29980)
* add token csrf level 3

* add token csrf level 3
2024-06-11 01:04:33 +02:00
Frédéric FRANCE
1ff0e8a821
fix an old error (#29850)
* fix an old error

* fix OdfException is never thrown in the try block

* fix OdfException is never thrown in the try block

* fix Undefined array key "name"

* fix missing translation

* fix missing translation

* fix Undefined variable $lineid

* fix warnings

* fix upload dir

* fix phpcs
2024-06-08 16:59:40 +02:00
Frédéric FRANCE
74806473ab
fix cti (#29842)
* fix cti odt asset

* comment unused code in template

* phpdoc

* fix unreachable code

* fix unreachable code

* fix not falsy
2024-06-05 14:55:07 +02:00
Laurent Destailleur
8971c8efac Exclude phan rule 2024-06-03 21:30:25 +02:00
Laurent Destailleur
8d16c2e996 Fix warning 2024-06-01 15:12:35 +02:00
Laurent Destailleur
ed212d0e84 Fix errormessage 2024-05-31 15:57:03 +02:00
Laurent Destailleur
82908a30eb Clean phan warnings 2024-05-30 13:37:17 +02:00
Frédéric FRANCE
2f16e2347c
fix phan (#29778)
* fix phan

* Update global.inc.php

* Update style.css.php
2024-05-28 23:53:06 +02:00
Laurent Destailleur
b5b87b9811 Increase memory 2024-05-26 15:45:54 +02:00
Laurent Destailleur
d62bd87f06 Clean. Too many files that are not uptodate. Better to update doc to
explain how to regenerate them.
2024-05-24 15:07:31 +02:00
Laurent Destailleur
c0f3ea0a11 Better error message 2024-05-22 17:01:21 +02:00
Laurent Destailleur
275a6eb6bb Show content if error 2024-05-22 16:48:18 +02:00
Laurent Destailleur
a5c5b7a2ee Fix check translation file 2024-05-22 16:44:48 +02:00
Laurent Destailleur
0769696fa3 Fix CTI errors 2024-05-22 03:01:13 +02:00
Laurent Destailleur
3bf47e5235 Enhance language error and warnings report 2024-05-22 02:31:01 +02:00
Laurent Destailleur
d68aa7ec6a Clean code 2024-05-22 02:12:16 +02:00
Laurent Destailleur
74f3b31b3e Cean code 2024-05-22 02:05:22 +02:00
Laurent Destailleur
44fda7fa68 Optimize image file size 2024-05-22 01:00:51 +02:00
Laurent Destailleur
a8e777993b Rename scripts 2024-05-22 00:39:22 +02:00
Laurent Destailleur
4b5b4c4e1a Clean some expected warnings 2024-05-13 12:49:14 +02:00
Laurent Destailleur
130c2e2a8f Clean code 2024-05-13 11:27:56 +02:00
Laurent Destailleur
22683066a9 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	ChangeLog
	htdocs/comm/action/card.php
2024-05-13 02:50:51 +02:00
Laurent Destailleur
2dd939d2db Fix dump 2024-05-13 02:46:31 +02:00
Laurent Destailleur
0163cc6278 Debug export website 2024-05-12 20:27:03 +02:00
Laurent Destailleur
0e34a20c14 Debug v20 2024-05-12 18:44:58 +02:00
Laurent Destailleur
87c445bbf1 Add website page type for ajax 2024-05-12 12:20:00 +02:00
Frédéric FRANCE
933e87ca81
Update codespell-dict.txt (#29644)
* Update codespell-dict.txt

* WYSIWYG

* phan
2024-05-10 12:34:08 +02:00
Laurent Destailleur
d523cb24e6 Disable useless phan warnings 2024-05-10 11:48:27 +02:00
Frédéric FRANCE
e7d83acccd
Update dynamic_translation_keys.lst (#29612)
* Update dynamic_translation_keys.lst

* Update ignore_translation_keys.lst

* Update dynamic_translation_keys.lst

* Update ignore_translation_keys.lst

* Update admin.lang
2024-05-06 23:02:11 +02:00
Frédéric FRANCE
17ef59421c
Update dynamic_translation_keys.lst (#29611) 2024-05-06 09:06:28 +02:00
MDW
2115980560
Qual: Fix Phan notices in CommonObject (#29354)
* Fix PhanPluginSimplifyExpressionBool in commonobject

* Fix commonobject for phan notices

* Allow null for $usedolidb argument

* Allow null for $outputlangs argument of \dol_format_address()

* Fix multiple phan notices

* Ignore PhanTypeArraySuspiciousNullable

* Fix PhanTypeMismatchArgumentProbablyReal

* Update baseline

* Improve typings

* Update type specification getCountry/withCode

* Fix CommonObject Phan notices & update baseline

* Fix phan notices

* Correct typing for showInputField to be the same as parent class

* Fix PhanPluginSimplifyExpressionBool in commonobject

* Fix commonobject for phan notices

* Allow null for $usedolidb argument

* Allow null for $outputlangs argument of \dol_format_address()

* Fix multiple phan notices

* Ignore PhanTypeArraySuspiciousNullable

* Fix PhanTypeMismatchArgumentProbablyReal

* Update baseline

* Improve typings

* Update type specification getCountry/withCode

* Fix CommonObject Phan notices & update baseline

* Fix phan notices

* fixup! Correct typing for showInputField to be the same as parent class
2024-05-02 19:33:51 +02:00
Laurent Destailleur
22987e35f3 Add API setup for Bruno 2024-04-30 22:52:26 +02:00
Laurent Destailleur
95467db0c7 Fix RSS 2024-04-30 21:14:53 +02:00
Laurent Destailleur
eda839a49a Fix RSS 2024-04-30 21:13:53 +02:00
Laurent Destailleur
679e06048c Fix RSS 2024-04-30 21:12:21 +02:00
Laurent Destailleur
5890e715bf Fix RSS 2024-04-30 21:02:02 +02:00
Laurent Destailleur
19afa4bb03 Fix RSS 2024-04-30 20:44:38 +02:00
Laurent Destailleur
bf8e25c41f Fix security rss file 2024-04-30 19:11:30 +02:00
Laurent Destailleur
dbb9ae1667 Log 2024-04-30 19:00:11 +02:00
Laurent Destailleur
26a0732fb9 Use PHPSTan level 4 2024-04-30 08:35:45 +02:00
Laurent Destailleur
1af7ad923c Fix phan 2024-04-28 21:56:41 +02:00
Laurent Destailleur
29b6d6b918 Add phpstan version in report 2024-04-28 16:20:44 +02:00
Frédéric FRANCE
26da44e254
fix phpstan (#29431)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* remove params not used

* add WARNING
2024-04-27 12:45:50 +02:00
Laurent Destailleur
0312aaef90 Fix warnings 2024-04-27 04:18:49 +02:00
Laurent Destailleur
2de1287afd Make CTI less paranoiac to avoid alert at any code change 2024-04-27 00:47:45 +02:00
Laurent Destailleur
5ece2e7a75 Clean translation files 2024-04-27 00:40:12 +02:00
Laurent Destailleur
6972fc8658 Clean translation files 2024-04-27 00:37:31 +02:00
Laurent Destailleur
c9d63625aa Clean translation files 2024-04-27 00:33:51 +02:00
Laurent Destailleur
ca65e9a333 QUAL the config_extended of phpstan will be kept on apstats only for the
moment: Too many CTI error not related to PR.
2024-04-24 21:44:58 +02:00
Laurent Destailleur
a669c3d3fa Disable PhanUndeclaredGlobalVariable 2024-04-24 20:56:41 +02:00
Laurent Destailleur
85b4077d0d Clean code 2024-04-24 20:35:36 +02:00
Laurent Destailleur
5166eee88c Clean code 2024-04-24 20:29:37 +02:00
Laurent Destailleur
6d3bf284d8 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-04-24 16:48:19 +02:00
Laurent Destailleur
7712a80c55 Fix phpstan 2024-04-24 16:48:05 +02:00
Frédéric FRANCE
7ea6a406bd
NEW add geometrics extrafield (#28239)
* add extrafield point

* wip

* wip

* wip

* input

* input

* output values

* update values

* update values

* update values

* update values

* update values

* wip

* add geomapeditor

* add geomapeditor

* add linestring and polygon

* add linestring and polygon

* add linestring and polygon

* add linestring and polygon

* wip

* wip

* can store and retrieve linestring

* can store and retrieve linestring

* coordinates are inverted

* coordinates are inverted

* add multipoints

* use text instead binary

* auto center map

* wip

wip

* doc

* fix

* wip

* wip

* translation dynamic

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-24 15:27:38 +02:00
Laurent Destailleur
82fd5a8ac3 Debug v20 2024-04-24 13:07:47 +02:00
Laurent Destailleur
68c81e5311 Debug v20 2024-04-24 11:26:08 +02:00
Laurent Destailleur
51c233e2bf Add branch name of security fixes 2024-04-23 12:55:21 +02:00
Laurent Destailleur
caa0004622 Fix report of branches 2024-04-23 12:27:01 +02:00
Laurent Destailleur
d3f4b146b2 NEW Try to add branches into apstats security report 2024-04-23 11:50:10 +02:00
Laurent Destailleur
3aa2875532 Fix url_root param 2024-04-22 15:02:43 +02:00
Laurent Destailleur
bce2575309 Add image to RSS feed 2024-04-22 13:57:12 +02:00
Laurent Destailleur
90201c508a Alert on last 3 month 2024-04-18 17:40:44 +02:00
Laurent Destailleur
9bb1fe6600 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-04-18 17:39:34 +02:00
Laurent Destailleur
bd3077ce67 Fix for smartphone 2024-04-18 17:38:33 +02:00
MDW
090970ed4f
Fix #29359 Add exception for contributor email (#29394) 2024-04-18 15:43:59 +01:00
MDW
da9fd874bc
Qual: Fix or ignore functions.lib.php phan notices (#29344)
* Fix: LogHandler parent class, implements interface & provides $code

* Fix: functions.lib phan notices

* Fix phan notifications

* Match expected DebugBar signature - rename getRenderer

* Call the correct renderer method for the DebugBar

* Use correct key type to access array

* Ignore notices

* Update functions.lib.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-14 04:46:33 +02:00
Laurent Destailleur
be52b8d75d Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-04-12 14:32:59 +02:00
Laurent Destailleur
3187d2888e Trans 2024-04-12 13:55:41 +02:00
Laurent Destailleur
1240072591 QUAL Make the same condition only once. 2024-04-12 13:53:18 +02:00
Laurent Destailleur
11c895dc9d Try to reduce CTI errors by removing alert on less important warnings. 2024-04-12 02:28:04 +02:00
Laurent Destailleur
32438fdbb3 Test precommit 2024-04-12 02:21:33 +02:00
MDW
bc5e5b67af
Qual: Update phan baseline (#29300)
* 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>
2024-04-12 01:06:52 +02:00
Laurent Destailleur
6fcec74fed Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-04-11 22:58:17 +02:00
Laurent Destailleur
0a3f66c6c4 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	dev/tools/codespell/codespell-ignore.txt
	htdocs/admin/system/security.php
	htdocs/core/class/commondocgenerator.class.php
	htdocs/core/menus/standard/eldy.lib.php
	htdocs/product/fournisseurs.php
2024-04-11 22:57:43 +02:00
MDW
e171e8e7ef
Qual: Fix all active phan notices in html.form.class.php (#29316) 2024-04-11 19:14:46 +02:00
Laurent Destailleur
feae114088 Rename email files 2024-04-11 19:07:05 +02:00
Laurent Destailleur
efaccbc519 Remove duplicate graph 2024-04-10 01:50:29 +02:00
Laurent Destailleur
89c9651fde Fix example of security options 2024-04-09 15:31:13 +02:00
Laurent Destailleur
345a315b50 Fix example of security options 2024-04-09 15:29:43 +02:00
Laurent Destailleur
39491976e1 Fix title 2024-04-08 19:26:37 +02:00
Laurent Destailleur
b6822272b3 Look and feel 2024-04-08 16:37:33 +02:00
Laurent Destailleur
f1a3df108f Fix thumbs replace by opencollective 2024-04-08 14:59:21 +02:00
Laurent Destailleur
3215fa1184 Try to add stats fro ossinsight 2024-04-08 14:30:44 +02:00
Laurent Destailleur
ea1c9ad11d Fix grouping of security alerts 2024-04-08 14:00:13 +02:00
MDW
4d496209ce
Qual: Phan/apstats should not be using the standard baseline (#29267)
# Qual: Phan/apstats should not be using the standard baseline

Fix to get apstats reporting on the technical debt.  The 'baseline.txt'
is for the ci regression.  The code is changed to allow a
'baseline_extended.txt' which should not be generated, only hand-crafted
2024-04-07 15:02:00 +02:00
MDW
bbde552979
Qual: Enable Phan Rules and update baseline (#29255)
* Fix script generating trailing whitespace

* Add nusoap as a stub for better analysis

* Qual: Return type for fetch_name_optionals_label to fix phan message

* Qual: Enable Phan Rules and update baseline

# Qual: Enable Phan Rules and update baseline

This enables all of the rules that are currently also
enabled for cti, but sets the baseline to ignore the
exceptions already present.
This will help detect exceptions added by code modifications
if the rule is not ignored for the given file.
2024-04-07 11:55:39 +02:00
Laurent Destailleur
fa43938f76 Fix merge same title of security issue 2024-04-07 11:46:12 +02:00
Laurent Destailleur
d0c7c7f2c7 Add CR on RSS feed of apstat 2024-04-05 15:51:41 +02:00
Laurent Destailleur
e9857d5473 Try new line in description of rss 2024-04-05 15:49:52 +02:00
Laurent Destailleur
5702c31110 Typo 2024-04-05 15:47:25 +02:00
Laurent Destailleur
f12826a952 Add link to securities 2024-04-05 15:43:43 +02:00
Laurent Destailleur
0d5b81796f Fix escape 2024-04-05 15:34:30 +02:00
Laurent Destailleur
5d0125870d Add link into rss 2024-04-05 15:32:46 +02:00
Laurent Destailleur
773fcd8f06 Fix rss 2024-04-05 15:04:18 +02:00
Laurent Destailleur
4ef9a2c0f5 Fix rss 2024-04-05 15:01:59 +02:00
Laurent Destailleur
50dfa79a43 Fix warning 2024-04-05 15:00:21 +02:00
Laurent Destailleur
5e24b6ef70 Fix rss 2024-04-05 14:56:59 +02:00
Laurent Destailleur
79deb2bc3a NEW Add a link to add a website category in edit page properties 2024-04-05 14:45:34 +02:00
Laurent Destailleur
4694b4e1b4 Worl on CSS generation 2024-04-05 14:11:34 +02:00
Laurent Destailleur
38fb00489d PHPDoc 2024-04-05 13:44:59 +02:00
Laurent Destailleur
d8d41cefbe Enhance security fixes 2024-04-05 10:59:40 +02:00
Laurent Destailleur
ba25317a97 Exclude PhanDeprecatedProperty for the moment 2024-04-05 10:22:01 +02:00
Laurent Destailleur
0fc08e8926 Clean translation files 2024-04-04 15:15:04 +02:00
Laurent Destailleur
2620cd9ca7 Transifex sync 2024-04-04 12:04:00 +02:00
Laurent Destailleur
0a39067cd6 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-04-04 11:01:06 +02:00
Laurent Destailleur
ad79acf63c QUAL removed duplicate language file 2024-04-04 11:00:35 +02:00
Laurent Destailleur
b21c3160d4
Merge pull request #29215 from frederic34/translations_errors
add Translations errors
2024-04-04 02:59:02 +02:00
Laurent Destailleur
bec30610d9 Add link to apstats 2024-04-03 19:23:53 +02:00
Frédéric FRANCE
613f8be05f Merge remote-tracking branch 'upstream/develop' into translations_errors 2024-04-03 14:47:01 +02:00
Frédéric FRANCE
c349d38897 add translations of errors 2024-04-03 14:46:46 +02:00
Laurent Destailleur
5acdcac75d Debug v20 2024-04-03 12:25:06 +02:00
Laurent Destailleur
a8d024f9f8 Fix lang 2024-04-02 14:11:24 +02:00
Laurent Destailleur
3df311481b NEW Management of the In-Reply-To and References for ticket answers. 2024-04-01 19:11:08 +02:00
Laurent Destailleur
535d9de357 Translation 2024-03-29 20:58:48 +01:00
Laurent Destailleur
2c1f7ed098
Merge branch 'develop' into patch-10 2024-03-28 14:53:59 +01:00
Frédéric FRANCE
94391c9b61
add MailSentBy for potential future use 2024-03-28 14:32:17 +01:00
Laurent Destailleur
787b1a1c83
Merge branch 'develop' into fix/filebyfile 2024-03-28 14:23:54 +01:00
Laurent Destailleur
a7e33e6573
Merge pull request #29047 from mdeweerd/fix/PhanPluginUnknownObjectMethodCall1
Fixes for PhanPluginUnknownObjectMethodCall
2024-03-28 14:20:57 +01:00
Laurent Destailleur
ee7293e758 Reorder file 2024-03-27 10:52:09 +01:00
Laurent Destailleur
f5ef058582 FIX Fatal error of imap on php8.2 2024-03-27 10:43:08 +01:00
MDW
24e48998ce
Add nempty to spelling 2024-03-27 10:18:42 +01:00
MDW
1c9c665b0b
Update baseline (improved) 2024-03-27 10:18:41 +01:00
MDW
6e5841b13d
Add checks on checkVal, price2num and GETPOSTFLOAT arguments 2024-03-27 10:18:41 +01:00
MDW
a703ea1092
Add checks on dol_(mktime|now|print_date) + avoid duplicate phan conf 2024-03-27 10:18:39 +01:00
MDW
88c2d7e34e
Add spelling for shippin 2024-03-27 10:18:24 +01:00
MDW
fc43b5a252
Ignore PhanParamTooMany for adherents/admin/member.php
# Ignore PhanParamTooMany for adherents/admin/member.php

Ignore PhanParamTooMany for adherents/admin/member.php for passing CI;
The problem pre-exists and can be fixed later.
2024-03-27 10:18:14 +01:00
MDW
aba83e9e42
Add function definitions to stub 2024-03-27 10:18:11 +01:00
Laurent Destailleur
1b98d99434 Fix regression in IMAP collecting 2024-03-26 21:19:50 +01:00
Laurent Destailleur
975d57b141 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-24 22:08:52 +01:00
Laurent Destailleur
43d2c13a59 Debug v20 2024-03-24 22:05:52 +01:00
Laurent Destailleur
8bcfefe42f
Update config_fixer.php 2024-03-24 16:39:25 +01:00
Laurent Destailleur
414c51d631
Update config_extended.php 2024-03-24 16:38:51 +01:00
Laurent Destailleur
d78bafe602
Update config_extended.php 2024-03-24 16:38:21 +01:00
Laurent Destailleur
c43bb3d52c
Update config.php 2024-03-24 16:37:21 +01:00
MDW
a1ae115757
Set cache_codes global type 2024-03-24 15:40:25 +01:00
MDW
34416d9723
Qual: Enable PhanNonClassMethodCall 2024-03-24 15:06:59 +01:00
MDW
02960415cb
Fix global typing of menumanager as MenuManager 2024-03-24 11:03:22 +01:00
MDW
04b3ed0c7e
Fix extrafeild typo 2024-03-24 11:03:03 +01:00
MDW
79a8533f53
Qual: Enable PhanTypeInvalidPropertyName 2024-03-24 11:03:02 +01:00
Laurent Destailleur
6a0678e717
Merge branch 'develop' into PhanTypeInvalidRightOperandOfNumericOp 2024-03-23 17:36:29 +01:00
Laurent Destailleur
50aadc43f9 NEW Upgrade jsChantImproved to 2.8.10 2024-03-23 17:18:11 +01:00
Laurent Destailleur
8906df343a NEW Add option THIRDPARTY_MIN_NB_PROF_ID and THIRDPARTY_MAX_NB_PROF_ID 2024-03-23 16:01:41 +01:00
MDW
2a13f7134c
Qual: Add extra phan stubs fixing PhanUndeclaredClassMethod 2024-03-23 14:29:54 +01:00
MDW
30b7ae336f
Qual: Enable dev/tools/phan/config.php 2024-03-23 13:14:35 +01:00
MDW
09b931e8fc
Qual: Enable PhanUndeclaredClassProperty 2024-03-23 03:19:04 +01:00
MDW
f96819398f
Add stub for multicompany 2024-03-23 03:19:03 +01:00
MDW
27091da3f3
Qual: Enable lidLeftOperandOfNumericOp 2024-03-23 02:06:57 +01:00
MDW
5c073dfb6e
Qual: Enable PhanTypeInvalidRightOperandOfAdd 2024-03-22 09:52:42 +01:00
MDW
b53d322f1b
Add exception for PhanTypeInvalidRightOperandOfAdd to baseline because issue to handle later 2024-03-22 09:52:34 +01:00
MDW
b8c16af0a3
Qual: Enable PhanTypeInvalidLeftOperandOfAdd 2024-03-22 09:51:38 +01:00
MDW
3908b4df9d
Qual: Enable PhanTypeInvalidLeftOperandOfBitwiseOp (all fixed) 2024-03-21 13:44:54 +01:00
Laurent Destailleur
61eefe5fa9
Merge branch 'develop' into fix/PhanTypeMismatchReturnNullable 2024-03-21 12:51:27 +01:00
Laurent Destailleur
ba9a846672 Fix trans missing 2024-03-21 12:50:30 +01:00
MDW
6bfdc4655f
Disable ignores phan's baseline.txt (fixed) 2024-03-20 21:58:43 +01:00
Laurent Destailleur
e3c76ca86a Clean translation files 2024-03-20 15:25:47 +01:00
Laurent Destailleur
cb3880cc62 Clean translations 2024-03-20 15:15:28 +01:00
Laurent Destailleur
c77a8f7d9e Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-20 12:51:02 +01:00
Laurent Destailleur
7ed5fb8890 Fix warning 2024-03-20 12:49:00 +01:00
MDW
9b146f3fe1
Fix restler stub ApiMethodInfo typing 2024-03-20 04:10:11 +01:00
MDW
a69dcc9c5a
Qual: Enable PhanTypeMismatchArgumentSuperType 2024-03-20 04:09:19 +01:00
MDW
390d164f82
Qual: Ignore PhanTypeMismatchArgumentNullableInternal 2024-03-20 04:09:18 +01:00
MDW
6413341c96
Qual: Enable PhanTypeMismatchArgumentInternal 2024-03-20 04:09:17 +01:00
MDW
a094ad38fc
Fix spelling (using beta codespell)
# Fix spelling (using beta codespell

New spelling fixes - ignoring thirdparty which should be either third-party
or third party.
2024-03-20 00:35:01 +01:00
Laurent Destailleur
5d073ac208 Fix hasRights into hasRight 2024-03-19 22:02:42 +01:00
MDW
04d7142463
Disable HTML plugin (detects HTML in PHP files)
# Disable HTML plugin (detects HTML in PHP files)

These messages are not really useful for dolibarr.
2024-03-19 18:09:19 +01:00
Laurent Destailleur
99b62cb4a6
Merge pull request #28389 from mdeweerd/setup_with_basedir
Enable open_basedir restriction during CI setup on windows
2024-03-19 16:05:31 +01:00
MDW
c181144c49
Qual: setup.sh - allow PHP envvar and force error reporting 2024-03-19 03:43:36 +01:00
MDW
c0e8e053b8
Fix port arg to count by adding typing information 2024-03-19 02:59:09 +01:00
MDW
cd3ea72f96
Qual: Disable global variable suggestion for $website 2024-03-19 02:44:07 +01:00
MDW
3c968477cb
Change type of global $website to string 2024-03-19 02:44:04 +01:00
MDW
921431dbdc
Qual: Enable PhanTypeSuspiciousStringExpression 2024-03-19 02:44:03 +01:00
Laurent Destailleur
29a858aa68
Merge pull request #28924 from mdeweerd/fix/whitespace
Fix trailing whitespace + format code + minor spelling + enable checks
2024-03-19 02:14:13 +01:00
Frédéric FRANCE
65fcc53519
Merge branch 'develop' into phpstanphpstan 2024-03-18 23:47:59 +01:00
Frédéric France
eb8014c001 Merge remote-tracking branch 'upstream/develop' into phpstanphpstan 2024-03-18 17:50:42 +01:00
Frédéric FRANCE
a9cabe6fe4
Update codespell-dict.txt 2024-03-18 16:39:49 +01:00
MDW
d2568a0878
Qual: Enable PhanUndeclaredVariableAssignOp 2024-03-18 13:12:53 +01:00
Frédéric France
21d0cc9470 Merge remote-tracking branch 'upstream/develop' into phpstanphpstan 2024-03-17 22:05:01 +01:00
Frédéric France
09a953d18f fix phpstan 2024-03-17 22:04:10 +01:00
MDW
686facd74d
Fix PhanPluginWhitespaceTrailing + format code + minor spelling 2024-03-17 21:35:08 +01:00
MDW
aa6c20bf0d
Qual: Enable PhanPluginWhitespaceTrailing 2024-03-17 21:35:07 +01:00
Laurent Destailleur
bb0e18deae
Merge pull request #28922 from mdeweerd/fix/printf
Fix & enable Phan printf checks
2024-03-17 21:08:26 +01:00
MDW
7a4f5ec4f8
Qual: Enable some low occurence notifications 2024-03-17 20:12:27 +01:00
MDW
aa5aa2bf26
Add one more index to the theme_datacolor 2024-03-17 19:49:10 +01:00
MDW
d73886281c
Qual: Set typing for global 2024-03-17 18:56:44 +01:00
MDW
81d5f30466
Qual: Enable PhanPluginPrintfIncompatibleArgumentType 2024-03-17 18:56:43 +01:00
MDW
4232713e96
Qual: enable PhanPluginPrintfVariableFormatString 2024-03-17 18:21:35 +01:00
Laurent Destailleur
91c5868020
Merge pull request #28909 from mdeweerd/fix/PhanPluginUnknownClosureReturnType
Fix & enable PhanPluginUnknownClosureReturnType
2024-03-17 03:03:35 +01:00
MDW
551eaa115c
Fix & enable PhanPluginUnknownClosureReturnType
# Fix & enable PhanPluginUnknownClosureReturnType

Fix last PhanPluginUnknownClosureReturnType & enable the notice as
all are fixed
2024-03-17 00:10:18 +01:00
MDW
ef6eea3ed2
Qual: Fix PhanTypeExpectedObjectOrClassName by testing on classname
# Qual: Fix PhanTypeExpectedObjectOrClassName by testing on classname

PhanTypeExpectedObjectOrClassName should be fixed by testing that the classname is not
empty.
2024-03-17 00:03:20 +01:00
Laurent Destailleur
7930226c0b
Merge branch 'develop' into qual/no_PhanTypeMismatchPropertyProbablyReal_exceptions 2024-03-16 21:37:43 +01:00
MDW
2460518608
Add exception with latest codespell 2024-03-16 18:13:13 +01:00
MDW
c146f708e3
Qual: Add dolibarrr to dict 2024-03-16 18:06:22 +01:00
Laurent Destailleur
6df5b5bc46
Merge branch 'develop' into fix/PhanTypeMismatchReturn 2024-03-16 16:43:49 +01:00
Laurent Destailleur
cac3fb2c55 Fix CTI 2024-03-16 16:41:44 +01:00
Laurent Destailleur
b3108d1790
Merge branch 'develop' into fix/PhanTypeMismatchReturn 2024-03-16 16:27:32 +01:00
Laurent Destailleur
581f85586d
Merge pull request #28610 from mdeweerd/clean/tools/duplicates/missing/unused/translations
NEW: Script for fast identification of missing/unused/duplicate translations
2024-03-16 16:15:19 +01:00
Laurent Destailleur
75fae0f27d
Merge branch 'develop' into fix/PhanTypeMismatchReturn 2024-03-16 16:08:08 +01:00
MDW
554b35be37
remove AI_KEY_API_CHATGPT as a dynamic key. 2024-03-16 16:00:07 +01:00
MDW
cb55fb0864
Remove PhanTypeMismatchPropertyProbablyReal exceptions in baseline 2024-03-16 14:56:55 +01:00
MDW
ee97747eb6
Qual: Update phan baseline with issue we're not fixing now 2024-03-16 13:52:53 +01:00
MDW
725e419a46
Qual: Enable PhanTypeMismatchReturn 2024-03-16 13:52:19 +01:00
MDW
7b53202f74
Qual: Enable detection of use of DeprecatedFunctions 2024-03-16 13:27:52 +01:00
Laurent Destailleur
1ce2288b79
Merge branch 'develop' into clean/tools/duplicates/missing/unused/translations 2024-03-16 12:50:11 +01:00
Laurent Destailleur
a247b474d7
Merge pull request #28885 from mdeweerd/fix/phan/low_occurrence
Fix some phan notifications with low occurrence
2024-03-16 11:48:10 +01:00
Laurent Destailleur
eb1a9727ea
Merge pull request #28888 from JonBendtsen/new_notification_action_triggers
NEW notification action triggers for cancelling orders and invoices
2024-03-16 11:45:56 +01:00
MDW
8a83388905
Qual: Enable several phan notifications 2024-03-16 00:00:25 +01:00
MDW
375e4d7ccf
Qual: Enable PhanTypeMismatchArgumentInternalReal 2024-03-15 23:41:17 +01:00
Jon Bendtsen
4f879f2c01 fix spelling mistake 2024-03-15 20:59:35 +01:00
Laurent Destailleur
372c8445fd
Merge pull request #28809 from mdeweerd/PhanPluginPrintfIncompatibleArgumentTypeWeak
Fix & enable PhanPluginPrintfIncompatibleArgumentTypeWeak occurrences
2024-03-15 16:32:40 +01:00
Laurent Destailleur
0ee6fd6bad
Merge pull request #28877 from mdeweerd/PhanTypeMismatchDefault
Fix & enable PhanTypeMismatchDefault
2024-03-15 15:44:30 +01:00
Laurent Destailleur
b658beab99
Merge pull request #28872 from mdeweerd/fix/PhanTypeMismatchReturnProbablyReal
Fix & enable PhanTypeMismatchReturnProbablyReal
2024-03-15 15:24:31 +01:00
Laurent Destailleur
1a722fa436
Merge branch 'develop' into fix/PhanTypeMismatchPropertyProbablyReal 2024-03-15 15:07:35 +01:00
MDW
1af4e90027
Qual: enable PhanTypeMismatchDefault 2024-03-15 14:53:07 +01:00
MDW
c7ad91cfc0
Qual: Enable PhanTypeMismatchReturnProbablyReal 2024-03-15 14:20:58 +01:00
Laurent Destailleur
066565938c
Merge pull request #28812 from mdeweerd/fix/PhanTypeSuspiciousEcho
Fix & enable PhanTypeSuspiciousEcho
2024-03-15 11:02:33 +01:00
Laurent Destailleur
11c77c410b
Merge pull request #28864 from mdeweerd/fix/PhanUndeclaredTypeReturnType
Fix & enable PhanUndeclaredTypeReturnType
2024-03-15 11:01:11 +01:00
MDW
651b5a22eb
Fix & enable PhanTypeSuspiciousEcho
# Fix & enable PhanTypeSuspiciousEcho

Fix occurences by improving typing - array key was not found and
supposed null in a print statement.

Example:
  PhanTypeSuspiciousEcho Suspicious argument $menu_array[$i]['prefix'] of type null for an echo/print statement

Enabled detection because all cases are fixed
2024-03-15 10:14:40 +01:00
MDW
ec6786ece3
Detect PhanTypeMismatchPropertyProbablyReal 2024-03-15 10:12:52 +01:00
MDW
3384a0b847
Fix & enable PhanUndeclaredTypeReturnType
# Fix & enable PhanUndeclaredTypeReturnType

One typo, and replace 'number' with int or int|float
2024-03-15 10:07:15 +01:00
Laurent Destailleur
470e68829d
Merge branch 'develop' into fix/PhanTypeInvalidUnaryOperandNumeric 2024-03-15 10:03:50 +01:00
Laurent Destailleur
80e2e59373
Merge pull request #28862 from mdeweerd/fix/PhanTypeMismatchPropertyDefault
Fix & enable PhanTypeMismatchPropertyDefault
2024-03-15 09:33:40 +01:00
Laurent Destailleur
e238cc204e
Merge pull request #28750 from mdeweerd/fix/PhanPluginSuspiciousParamPosition
Fix: Resolve several PhanPluginSuspiciousParamPosition cases
2024-03-15 08:45:25 +01:00
Laurent Destailleur
1a63080e44
Merge branch 'develop' into fix/PhanTypeMismatchPropertyDefault 2024-03-15 08:41:23 +01:00
Laurent Destailleur
ba4e454827
Merge pull request #28829 from rycks/develop_add_projects_linked_by_a_contact_option
NEW Can show the list of projects having at least one contact that is a contact of the third party
2024-03-15 08:29:39 +01:00
Laurent Destailleur
176d8173a6
Merge pull request #28861 from mdeweerd/fix/PhanPluginPHPDocInWrongComment
Fix & enable PhanPluginPHPDocInWrongComment
2024-03-15 08:28:47 +01:00
MDW
9fd8b8c8e8
Qual: Enable PhanTypeMismatchPropertyDefault 2024-03-15 03:55:53 +01:00
Laurent Destailleur
b23e627a05
Merge pull request #28800 from mdeweerd/PhanPluginDuplicateConditionalUnnecessa
Fix & enable PhanPluginDuplicateConditionalUnnecessary "X ? Y : Y"
2024-03-15 00:27:58 +01:00
Laurent Destailleur
0691839c7b
Merge branch 'develop' into develop_add_projects_linked_by_a_contact_option 2024-03-14 23:57:30 +01:00
Laurent Destailleur
c49968bb4b
Merge pull request #28825 from mdeweerd/fix/PhanNoopBinaryOperator
Fix & Enable PhanNoopBinaryOperator
2024-03-14 23:55:33 +01:00
MDW
ab7879c4a2
Fix & enable PhanPluginPHPDocInWrongComment
# Fix & enable PhanPluginPHPDocInWrongComment

Ignore error in file where the notification occurs & enable detection.
2024-03-14 23:36:24 +01:00
Laurent Destailleur
e478fd8cbc
Merge pull request #28859 from mdeweerd/fix/PhanPluginUnknownClosureParamType
Fix & enable PhanPluginUnknownClosureParamType
2024-03-14 23:10:37 +01:00
Laurent Destailleur
2508523f66
Merge pull request #28826 from mdeweerd/fix/PhanNoopProperty
Fix & enable PhanNoopProperty
2024-03-14 23:08:00 +01:00
MDW
0f8b9e73f0
Fix: Enable/fix PhanPluginPrintfIncompatibleArgumentTypeWeak occurences
# Fix: Enable/fix PhanPluginPrintfIncompatibleArgumentTypeWeak occurences

Fix the PhanPluginPrintfIncompatibleArgumentTypeWeak occurences and fix the rule
2024-03-14 23:00:47 +01:00
MDW
43342c8978
Qual: Allow PhanNoopBinaryOperator (all fixed) 2024-03-14 22:57:43 +01:00
Laurent Destailleur
ae85f06ed3
Merge pull request #28857 from mdeweerd/phan/extended/disable_PhanPluginDuplicateCatchStatementBody
Qual: Disable PhanPluginDuplicateCatchStatementBody requires PHP7.1
2024-03-14 22:43:55 +01:00
MDW
a408288ba1
Fix & enable PhanPluginUnknownClosureParamType
# Fix & enable PhanPluginUnknownClosureParamType

Typing of anonymous functions to fix this notice.
Optimised some minor things.
2024-03-14 22:42:26 +01:00
MDW
97f4e4f462
Qual: Disable PhanPluginDuplicateCatchStatementBody which requires PHP7.1 for fix
# Qual: Disable PhanPluginDuplicateCatchStatementBody which requires PHP7.1 for fix

To fix this PHP7.1 is required, so skipping the message in the extended
report as well.
2024-03-14 20:05:32 +01:00
MDW
b2cbf7fe3c
Qual: Enable PhanPluginDuplicateConditionalUnnecessary notices (all fixed) 2024-03-14 19:47:27 +01:00
MDW
69be3bbca6
Fix PhanTypeInvalidUnaryOperandNumeric & remove from exceptions
# Fix PhanTypeInvalidUnaryOperandNumeric & remove from exceptions

Fix by casting result of date() or by adding typing hints.

(This notification indicates a unary '-' or similar is performed
on a value that may not be a number).
2024-03-14 19:39:49 +01:00
MDW
49416784ce
Fix PhanPluginSuspiciousParamPosition 2024-03-14 19:39:29 +01:00
MDW
b28f6a2cba
Enable PhanNoopProperty 2024-03-14 19:37:47 +01:00
Eric Seigne
385732c12d codespell and datee 2024-03-14 18:09:04 +01:00
MDW
1e252dd587
Add spelling exception (datee + error in Changelog) 2024-03-14 17:05:27 +01:00
MDW
7210feaceb
Merge branch 'develop' into clean/tools/duplicates/missing/unused/translations 2024-03-14 15:42:12 +01:00
Eric Seigne
da543ac96d codespell and datee 2024-03-14 10:00:48 +01:00
MDW
0127cc76f5
Qual: Enable PhanTypeInvalidUnaryOperandIncOrDec (all fixed) 2024-03-13 17:38:14 +01:00
Laurent Destailleur
cad8f24322
Merge pull request #28799 from mdeweerd/fix/PhanPluginDuplicateExpressionAssignmentOperation
Fix & enable PhanPluginDuplicateExpressionAssignment
2024-03-13 14:49:21 +01:00
Laurent Destailleur
4afadf6dc4
Merge pull request #28804 from mdeweerd/fix/PhanPluginUnknownFunctionParamType
Fix & enable PhanPluginUnknownFunctionParamType
2024-03-13 14:31:18 +01:00
Laurent Destailleur
c3f28b8592
Merge pull request #28802 from mdeweerd/PhanPluginRedundantAssignment
Fix PhanPluginRedundantAssignment
2024-03-13 11:04:02 +01:00
MDW
73eeb69cc8
Qual: Enable PhanPluginUnknownFunctionParamType (all fixed) 2024-03-13 10:51:46 +01:00
MDW
1debf4f538
# Fix & enable PhanPluginPrintfNotPercent
Fix PhanPluginPrintfNotPercent by setting format length to non 0 value.

Example of Notification message:

    'Format string "%0.10F" contains something that is not a percent sign, it will be treated as a format string '%0.10F' with padding of "0" and alignment of '' but no width. Use %% for a literal percent sign, or '%1$.10F' to be less ambiguous' .
2024-03-13 10:42:13 +01:00
MDW
15324eebee
Merge branch 'develop' into clean/tools/duplicates/missing/unused/translations 2024-03-13 01:33:46 +01:00
MDW
fcca1b6987
Qual: Enable PhanPluginRedundantAssignment (all fixed) 2024-03-13 01:05:05 +01:00
MDW
6170ebe82e
Qual: Enable PhanPluginDuplicateExpressionAssignment, all fixed 2024-03-12 22:27:58 +01:00
MDW
4df31b5664
Qual: Enable PhanPluginMixedKeyNoKey, all cases fixed 2024-03-12 21:35:54 +01:00
MDW
8f7fb3fac9
Qual: No more exception for PhanPluginDuplicateIfCondition 2024-03-12 19:16:44 +01:00
Laurent Destailleur
a6926c29c0
Merge pull request #28778 from fappels/develop_fix_delivery_note
Fix shipping is not a delivery_note (is sub module of shipping)
2024-03-12 14:53:51 +01:00
Laurent Destailleur
367f47428f
Merge pull request #28734 from mdeweerd/fix/PhanTypeMismatchDimAssignment
Qual: Fix and enable PhanTypeMismatchDimAssignment
2024-03-12 14:20:34 +01:00
Laurent Destailleur
d62ef14064
Merge pull request #28768 from mdeweerd/fix/PhanTypeMismatchDeclaredParamNullable
Fix: PhanTypeMismatchDeclaredParamNullable & enable detection
2024-03-12 14:19:41 +01:00
Francis Appels
6f1b184f17 Merge remote-tracking branch 'Dolibarr/develop' into develop_fix_delivery_note 2024-03-12 14:13:41 +01:00
Francis Appels
75e99a6dee Fix phan tool for shipping 2024-03-12 11:21:42 +01:00
Frédéric FRANCE
d7517b5f20 Merge remote-tracking branch 'upstream/develop' into clean_mod_code 2024-03-12 09:25:53 +01:00
Laurent Destailleur
d94d7ef700 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-12 00:41:50 +01:00
Frédéric France
c8c003a437 restore rule 2024-03-11 23:46:48 +01:00
Frédéric France
e60db40fa4 clean code and phpdoc 2024-03-11 22:20:29 +01:00
Frédéric France
7a7d342aaa clean code and phpdoc 2024-03-11 22:14:39 +01:00
MDW
200bc042bd
Qual: Enable PhanTypeMismatchDeclaredParamNullable
# Qual: Enable PhanTypeMismatchDeclaredParamNullable

The few cases for PhanTypeMismatchDeclaredParamNullable were fixed,
so the notification can be enabled
2024-03-11 16:48:55 +01:00
Laurent Destailleur
98a4ec593f
Merge branch 'develop' into clean/tools/duplicates/missing/unused/translations 2024-03-11 16:41:51 +01:00
Laurent Destailleur
e236553ea8
Merge branch 'develop' into fix/PhanTypeMismatchDimAssignment 2024-03-11 14:41:04 +01:00
MDW
dbfb1180ee
Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions (#28749)
# 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
2024-03-11 12:58:51 +01:00
Laurent Destailleur
5c84032d41
Merge branch 'develop' into fix/PhanTypeMismatchDimAssignment 2024-03-11 12:56:23 +01:00
MDW
9c00a465c9
Qual: phan: Add more global definitions (#28745)
* Qual: phan: Add more global definitions

# Qual: phan: Add more global definitions

Add some more typing information for globals

* Qual: phan: ignore local conf file which may contain exceptions

* Qual: phan: add a few more global typings
2024-03-11 12:55:44 +01:00
Laurent Destailleur
0fb4a44563 Fix nb of lines 2024-03-10 22:13:37 +01:00