Commit Graph

2747 Commits

Author SHA1 Message Date
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
3b0e83c533 Fix PhanTypeMismatchReturnProbablyReal 2024-03-15 14:20:57 +01:00
evarisk-micka
d43c3227db Add signed status CRUD to contract and fichinter 2024-03-15 12:12:21 +01:00
MDW
6a606bf7c1 Adjust typing for 'origin' & 'origin_object' 2024-03-15 10:12:46 +01:00
MDW
b57b4c8f17 Qual: Improve typing hints, in particular sendtoid 2024-03-15 10:11:55 +01:00
Laurent Destailleur
80e2e59373 Merge pull request #28862 from mdeweerd/fix/PhanTypeMismatchPropertyDefault
Fix & enable PhanTypeMismatchPropertyDefault
2024-03-15 09:33:40 +01:00
MDW
23785393a3 Add csslist to json keys 2024-03-15 03:55:52 +01:00
MDW
27e89df94d Fix PhanPluginSuspiciousParamPosition 2024-03-14 19:39:33 +01:00
Laurent Destailleur
c867bc2706 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-13 22:36:45 +01:00
Laurent Destailleur
8bfc0779c4 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-03-13 22:20:08 +01:00
MDW
5668974d46 Fix PhanPluginRedundantAssignment 2024-03-13 00:40:44 +01:00
Laurent Destailleur
d51b0f9ae4 Merge pull request #28792 from mdeweerd/fix/PhanTypeExpectedObjectOrClassName_part1
Fix/phan type expected object or class name part1
2024-03-12 22:14:14 +01:00
MDW
7e52b2f632 Fix duplicate if condition with same effect 2024-03-12 19:13:40 +01:00
MDW
bba0d4661e 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-12 18:40:03 +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
9e16016125 Merge pull request #28770 from mdeweerd/typing/fields
Fix: Repeat fields typing in CommonClass children
2024-03-12 14:30:36 +01:00
Laurent Destailleur
949c885477 Merge branch 'develop' into fix/phpdoc1 2024-03-12 14:11:30 +01:00
MDW
88d59896ec Qual: 'enabled' in fields can be string ('isModEnabled(...)')
# Qual: 'enabled' in fields can be string ('isModEnabled(...)')

Update PHPdoc to allow that enabled is a string
2024-03-12 13:38:08 +01:00
Francis Appels
ba1ca6dc7d module delivery_note not exist (no own module descriptor) is global MAIN_SUBMODULE_DELIVERY 2024-03-12 11:46:12 +01:00
Laurent Destailleur
56950673b8 Better support for MAIN_OPTIMIZEFORTEXTBROWSER 2024-03-12 02:41:47 +01:00
MDW
44376cd066 More specific type for childtablesoncascade 2024-03-11 22:16:27 +01:00
Laurent Destailleur
769b682fd3 Update commonobject.class.php 2024-03-11 16:13:11 +01:00
Laurent Destailleur
1178b858d8 Merge branch 'develop' into fix/getChildrenOfLine/array_merge 2024-03-11 15:22:44 +01:00
Laurent Destailleur
0f2121e3ba Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-11 13:46:08 +01:00
MDW
c333075776 Fix: getChildrenOfLine's use of includealltree as array
# Fix: getChildrenOfLine's use of includealltree as array

includealltree of getChildrenOfLine was used as an array, fixed
2024-03-11 13:41:02 +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
MDW
6d9e7b8144 Qual: Fix PhanTypeMismatchArgumentInternalProbablyReal (#28732)
* Fix: False positive for PhanTypeMismatchArgumentInternalProbablyReal

* Qual: phan: suppress false positive on ssl_set

* Qual: Enable PhanTypeMismatchArgumentInternalProbablyReal

# Qual: Enable PhanTypeMismatchArgumentInternalProbablyReal

PhanTypeMismatchArgumentInternalProbablyReal are fixed and reporting can
be enabled.

* Qual: Fix PhanTypeMismatchArgumentInternalProbablyReal by improving typing

* Qual: Rewrite/optimize to fix PhanTypeMismatchArgumentInternalProbablyReal

# Qual: Rewrite/optimize to fix PhanTypeMismatchArgumentInternalProbablyReal

False positive detecting that  is not an int, rewriting to check
impact
2024-03-10 01:55:56 +01:00
MDW
37afba949e Fix most PhanTypeMismatchDimAssignment notices (#28739)
* Qual: Add typing to fix PhanTypeMismatchDimAssignment notice

* Fix: Initialise array for code in somme

* Qual: Update type hint for  argument in _Set_Format

* Qual: Update type hint for childtables

* Qual: Add typing to attributes

* Qual: Add typing for _msgContent

* Qual: Suppress PhanTypeMismatchDimAssignment

* Qual: Add typing for liste

* Qual: Add typing to fields

* Qual: Add typing hint for $objMod

* Qual: Modify assignment of array with bool keys for phan typing

Demonstration:
```
php -r '$a=[true=>"yes",false=>"no"];var_dump($a);'
# Result demonstrates bool keys are converted to int.
Command line code:1:
array(2) {
  [1] =>
  string(3) "yes"
  [0] =>
  string(2) "no"
}
```

* Qual: Add typing hint to indicate value is not null

* Force non-null type on $paramname

* Qual: Add typing hint to getCats()

* Update inc.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-10 01:53:04 +01:00
MDW
3d0a85608b Qual: Fix and enable alias deprecation detection (#28716)
* 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>
2024-03-08 21:34:18 +01:00
Anthony Berton
ff03f86a50 NEW - See the documents of my subordinates (#28318)
* NEW - See the documents of my subordinates

* cop

* Rewriting

* up

* ok

* FIX - Restriction on sale representative

---------

Co-authored-by: Anthony Berton <anthony.berton@bb2a.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-07 22:47:29 +01:00
Frédéric FRANCE
c2379bfdf5 fix phpstan (#28694)
* fix phpstan

* fix typo

* fix phpstan
2024-03-07 21:39:29 +01:00
John BOTELLA
7b5982de5b NEW : Factoring and Fix external module elementType limit - Part 02 (#28666)
* Fix element type size

* Factoring getElementType

* Update commonobject.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-07 20:32:41 +01:00
thibdrev
07b2850c27 qual: phpstan for htdocs/compta/paiement/class/paiement.class.php (#28689)
htdocs/compta/paiement/class/paiement.class.php	115	PHPDoc type array of property Paiement::$multicurrency_tx is not covariant with PHPDoc type array|float of overridden property CommonObject::$multicurrency_tx.

htdocs/compta/paiement/class/paiement.class.php	120	PHPDoc type array of property Paiement::$multicurrency_code is not covariant with PHPDoc type array|string of overridden property CommonObject::$multicurrency_code.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-07 20:22:51 +01:00
atm-adrien
7bb55aa225 FIX : Translation for select (#28677)
* FIX : Adding thez dependencies list feature for select fields

* FIX : Adding some spaces

* FIX : View

* FIX : Translating
2024-03-07 15:56:17 +01:00
Laurent Destailleur
7866ee472b QUAL Clean code around dol_eval use 2024-03-06 17:07:24 +01:00
Laurent Destailleur
c544efec7f QUAL: Remove use of customurl filter. Must use the USF syntax. 2024-03-05 03:51:36 +01:00
Laurent Destailleur
ce010a54c7 Clean code and prepare a more powerfull phpunit check for sql forging. 2024-03-05 00:22:12 +01:00
Laurent Destailleur
19a22f6b6d Fix #28509 2024-03-01 20:55:31 +01:00
Laurent Destailleur
4279478acd Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-03-01 19:40:36 +01:00
Laurent Destailleur
47861abb48 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-03-01 19:05:46 +01:00
Laurent Destailleur
aaae1aad67 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-01 19:02:16 +01:00
Laurent Destailleur
615a80835a Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-03-01 19:00:32 +01:00
Laurent Destailleur
1b1edaf0a6 php syntax 2024-03-01 18:40:48 +01:00
atm-adrien
de76330aae FIX : Adding the dependencies list feature for extrafields "select" (#28549)
* FIX : Adding thez dependencies list feature for select fields

* FIX : Adding some spaces

* FIX : View
2024-03-01 18:39:32 +01:00
smselver
449d31a424 make some small grammatical upgrade to README (#28537)
* make some small grammatical upgrade to README

* fixed exemple in htdocs/common/core

---------

Co-authored-by: steve <steve.s@onedmaterial.com>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-01 12:46:18 +01:00
Frédéric FRANCE
016de3ef66 fix codespell (#28536)
* fix codespell

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-03-01 12:39:23 +01:00
Laurent Destailleur
df8a6bd336 Fix warning 2024-02-29 20:39:21 +01:00
Laurent Destailleur
034d6d8174 Fix bad property name 2024-02-29 19:54:41 +01:00
Laurent Destailleur
821f327da4 Fix name of webservice 2024-02-29 19:47:58 +01:00