Commit Graph

489 Commits

Author SHA1 Message Date
Laurent Destailleur
871e01d955 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-31 14:32:55 +02:00
Laurent Destailleur
32d3424423 Fix warning 2024-07-31 14:29:42 +02:00
Laurent Destailleur
d2bd6a03ec Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-31 13:21:02 +02:00
Laurent Destailleur
2f7a252244 Fix warnings 2024-07-31 13:09:10 +02:00
thibdrev
b020603cd5 qual: use isProduct() and isService() for better code readability (#30387)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-15 21:22:50 +02:00
Laurent Destailleur
147a8bfaee Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/adherents/subscription/list.php
	htdocs/categories/viewcat.php
	htdocs/contrat/card.php
	htdocs/contrat/list.php
	htdocs/eventorganization/conferenceorbooth_list.php
	htdocs/expedition/list.php
	htdocs/societe/card.php
2024-07-11 10:44:39 +02:00
Alexandre SPANGARO
128769811c Add css bodylist on list (#30334)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-11 00:45:05 +02:00
Laurent Destailleur
8a4f550d64 Debug v20 2024-07-09 17:33:27 +02:00
Frédéric FRANCE
2f5647e4e3 fix checkFunctionArgumentTypes (#30234)
* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* add ignore

* add ignore

add ignore

add ignore

add ignore

add ignore

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes

* fix checkFunctionArgumentTypes
2024-07-03 02:30:53 +02:00
Alexandre SPANGARO
96afcaa476 Better comments (#30200)
* Fix language

* Fix language

* Fix language

* Fix language

* Fix language

* Fix language

* Fix language

* CI Missing language key

* Update eventorganization.lang

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-06-30 21:02:50 +02:00
thibdrev
9b6586ea64 qual: phpdoc for ProductCombination.class.php (#30105)
* qual: phpdoc for ProductCombination.class.php

* use array_map to cast array values upstream

* phpdoc

* fix phan warning

Avoid function calls in a FOR loop test part
2024-06-22 15:40:26 +02:00
thibdrev
57c75aa350 qual: phpdoc for htdocs/variants/class/ProductAttributeValue.class.php (#30050)
* qual: phpdoc for htdocs/variants/class/ProductAttributeValue.class.php

htdocs/variants/class/ProductAttributeValue.class.php	78	Plugin PhanPluginUnknownPropertyType Property \ProductAttributeValue->id has an initial type that cannot be inferred

htdocs/variants/class/ProductAttributeValue.class.php	79	Plugin PhanPluginUnknownPropertyType Property \ProductAttributeValue->fk_product_attribute has an initial type that cannot be inferred

htdocs/variants/class/ProductAttributeValue.class.php	80	Plugin PhanPluginUnknownPropertyType Property \ProductAttributeValue->ref has an initial type that cannot be inferred

htdocs/variants/class/ProductAttributeValue.class.php	81	Plugin PhanPluginUnknownPropertyType Property \ProductAttributeValue->value has an initial type that cannot be inferred

htdocs/variants/class/ProductAttributeValue.class.php	82	Plugin PhanPluginUnknownPropertyType Property \ProductAttributeValue->position has an initial type that cannot be inferred

* phpcs

* better wording

* phpcs
2024-06-17 13:22:47 +02:00
thibdrev
b14d20bc4c qual fix PHAN warning when using $product->fetch($id) with $id not being an integer (#30019)
* qual fix phan warning on $object->fetch('')

TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($id) is '' of type '' but \Product::fetch() takes int (no real type) defined at htdocs/product/class/product.class.php:2540 (the inferred real argument type has nothing in common with the parameter's phpdoc type)

htdocs/variants/class/ProductCombination.class.php	773

* Update api_categories.class.php

* Update api_categories.class.php

* Update api_products.class.php

* Update api_products.class.php

* Update combinations.php
2024-06-15 15:53:36 +02:00
thibdrev
dd66a407e4 qual: fix PHAN warnings for ProductCombination.class.php (#30020)
htdocs/variants/class/ProductCombination.class.php	843	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	843	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	846	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	846	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	851	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	851	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string
2024-06-15 15:01:40 +02:00
Frédéric FRANCE
facb1930a7 fix phpstan Property Product::$oldcopy in empty() is not falsy (#30003)
* fix phpstan Property Product::$oldcopy in empty() is not falsy

* add token

* doc

* fix phpstan Property Product::$oldcopy in empty() is not falsy

* fix phpstan Property Product::$oldcopy in empty() is not falsy

* fix phpstan
2024-06-13 08:11:11 +02:00
HENRY Florian
e3d4299dde fix: php warning undefined index (#29890) 2024-06-07 17:49:50 +02:00
Laurent Destailleur
66f4562300 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-05-23 14:50:17 +02:00
Laurent Destailleur
a854e58905 FIX Missing $param in hook call for list 2024-05-23 14:41:56 +02:00
Laurent Destailleur
458ffdb23e css 2024-05-09 18:15:57 +02:00
Frédéric FRANCE
d0830b3159 fix phpstan (#29602)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix travis

* fix phpstan

* fix phpstan

* fix phan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

fix phpstan

fix phpstan

fix phpstan

fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix travis

* fix phpstan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-05-05 00:34:19 +02:00
Laurent Destailleur
e3daa23949 Look and feel v20 2024-04-30 09:45:28 +02:00
thibdrev
bc6c31cba4 qual: phpstan for ProductCombination.class.php (#29518)
* qual: phpstan for ProductCombination.class.php

htdocs/variants/class/ProductCombination.class.php	725	Method ProductCombination::getUniqueAttributesAndValuesByFkProductParent() should return array<ProductAttributeValue> but returns array<int<0,max>,stdClass>.

* Update ProductCombination.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-28 17:36:25 +02:00
thibdrev
03a4d7bcce phpdoc (#29474) 2024-04-27 04:20:55 +02:00
thibdrev
52e195fe17 phpdoc (#29480) 2024-04-27 04:20:26 +02:00
thibdrev
30b9b71396 phpdoc (#29481) 2024-04-27 04:19:35 +02:00
thibdrev
4cb4d2ca37 clean code (#29503) 2024-04-27 00:50:31 +02:00
thibdrev
3027ed48c1 qual: Variants - cleaner code and improved attributes readability (#29505)
* clean code

* phpcs
2024-04-27 00:49:58 +02:00
thibdrev
86b219a17f qual: clean code (#29457)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-25 10:40:05 +02:00
thibdrev
e2eb4e9168 qual: clean code (#29454)
* qual: clean code

* Update combinations.php

* Update combinations.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-25 10:33:47 +02:00
Frédéric FRANCE
64508a3909 fix phpstan (#29397) 2024-04-20 22:45:52 +01:00
Benjamin Falière
948e204fae ADD arrayfields as parameter in doActions (#29326)
* ADD arrayfields as parameter in doActions

* FIX typo

* FIX syntax error

---------

Co-authored-by: Benjamin Falière <benjamin.faliere@altairis.fr>
2024-04-11 20:07:13 +02:00
Laurent Destailleur
fd9475be03 Use same doc comment eveywhere. 2024-04-07 12:26:27 +02:00
Laurent Destailleur
38fb00489d PHPDoc 2024-04-05 13:44:59 +02:00
MDW
df0e663c13 Improve fetAllByProductAttribute phpdoc return type 2024-03-29 18:26:47 +01:00
MDW
0ccdbfe147 Correct/improve phpdoc typing 2024-03-29 18:26:45 +01:00
Laurent Destailleur
7b0177a84d Move to getDolGlobalString 2024-03-22 00:37:56 +01:00
MDW
aeefca7e7e Fix $arrayfields typing lost by dol_sort_array() by forcing the type 2024-03-20 23:29:48 +01:00
MDW
4625a6eaaa Fix arg type for trim with cast 2024-03-20 04:10:04 +01:00
MDW
fd9d48faac Fix phpstan CommonObject->fields - notnull is optional field 2024-03-19 00:32:00 +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
Laurent Destailleur
de58435ef1 FIX: if we stop for security purpose, we must exit a non zero value. 2024-03-16 23:08:15 +01:00
Laurent Destailleur
e994d6650f Fix regression in GETPOST limit 2024-03-16 11:41:00 +01:00
Laurent Destailleur
79aa9fb1f1 Code simpler 2024-03-15 20:29:21 +01:00
MDW
b28a17ee51 Fix Assign to error as string, not to error as array 2024-03-15 10:11:54 +01:00
MDW
23785393a3 Add csslist to json keys 2024-03-15 03:55:52 +01:00
MDW
e8f49e9bf8 Fix PhanTypeMismatchPropertyDefault 2024-03-15 03:54:14 +01:00
MDW
4aa0ccd870 Fix PhanTypeMismatchPropertyDefault 2024-03-15 03:54:14 +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
Laurent Destailleur
74b8162d22 Merge pull request #28700 from mdeweerd/urlencode/fixuptype
Fix: Ensure the argument type for urlencode is string
2024-03-12 14:43:41 +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