Commit Graph

186 Commits

Author SHA1 Message Date
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
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
Frédéric FRANCE
64508a3909 fix phpstan (#29397) 2024-04-20 22:45:52 +01: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
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
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
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
MDW
c58a2db86b Fix: Repeat fields typing in CommonClass children
# Fix: Repeat fields typing in CommonClass children

phpstan needs typing to be 'co-variant' and therefore typing must be repeated as
the method is not to initialise the property in the constructor, but to override
the proparty by a 'local' definition in the child class
2024-03-11 17:40:33 +01:00
MDW
13fcaf19f2 Fix: Repeat fields typing in CommonClass children
# Fix: Repeat fields typing in CommonClass children

phpstan needs typing to be 'co-variant' and therefore typing must be repeated as
the method is not to initialise the property in the constructor, but to override
the proparty by a 'local' definition in the child class
2024-03-11 17:40:31 +01:00
Laurent Destailleur
5c80d4b4fd CSS 2024-03-05 15:43:11 +01:00
Frédéric FRANCE
fe0123262d fix phpstan (#28401)
Property ProductCombinationLevel::$fk_product_attribute_combination (int) does not accept float.
2024-02-25 10:00:58 +01:00
thibdrev
c93905cf81 qual: phpstan for htdocs/variants/class/ProductAttribute.class.php (#28122)
htdocs/variants/class/ProductAttribute.class.php	1401	Parameter #7 $seller (string) of method ProductAttribute::printObjectLine() should be compatible with parameter $seller (Societe) of method CommonObject::printObjectLine()
htdocs/variants/class/ProductAttribute.class.php	1401	Parameter #8 $buyer (string) of method ProductAttribute::printObjectLine() should be compatible with parameter $buyer (Societe) of method CommonObject::printObjectLine()
2024-02-12 02:06:42 +01:00
kkhelifa-opendsi
dbb8861a98 NEW: Sort variants list by product ref on combinations page (#27969) 2024-02-02 17:45:30 +01:00
thibdrev
5a15ff9931 qual: phpstan for htdocs/variants/class/ProductAttribute.class.php
htdocs/variants/class/ProductAttribute.class.php	1315	Parameter #2 $seller (string) of method ProductAttribute::printObjectLines() should be compatible with parameter $seller (Societe) of method CommonObject::printObjectLines()

htdocs/variants/class/ProductAttribute.class.php	1315	Parameter #3 $buyer (string) of method ProductAttribute::printObjectLines() should be compatible with parameter $buyer (Societe) of method CommonObject::printObjectLines()

htdocs/variants/class/ProductAttribute.class.php	1401	Parameter #7 $seller (string) of method ProductAttribute::printObjectLine() should be compatible with parameter $seller (Societe) of method CommonObject::printObjectLine()

htdocs/variants/class/ProductAttribute.class.php	1401	Parameter #8 $buyer (string) of method ProductAttribute::printObjectLine() should be compatible with parameter $buyer (Societe) of method CommonObject::printObjectLine()
2024-01-25 12:03:22 +01:00
MDW
39769482b1 Qual: Fix typing hints for DoliDB (#27484)
# Qual: Fix typing hints for DoliDB

This should help the static tools for type and method checking.
2024-01-13 15:50:02 +01:00
MDW
342ab85195 Qual: Spelling htdocs/[q-z]* (#27447)
# Qual: Fix spelling htdocs/[q-z]*

Probably fixes a bug:

- htdocs/webservices/server_thirdparty.php
  No other occurence of adress found.
  -'adress'=>->adress,- +'address'=>->address,+
2024-01-12 17:18:52 +01:00
Laurent Destailleur
b28ae5d8d3 Clean code 2023-12-27 12:12:20 +01:00
Frédéric FRANCE
61b79fda17 avoid phpstan error with phpdoc 2023-12-06 15:46:39 +01:00
Laurent Destailleur
619155f65e Fix with php-cs-fixer 2023-12-04 13:53:48 +01:00
Frédéric FRANCE
53c8a3acf8 clean phpdoc for phpstan (#26905) 2023-12-01 19:51:32 +01:00
Laurent Destailleur
075ee02901 Fix php8.2 warnings 2023-11-27 12:08:48 +01:00
Laurent Destailleur
e910c3fa4e CSS 2023-11-16 15:14:01 +01:00
Laurent Destailleur
b65d5c8740 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-11-05 19:52:54 +01:00
thibdrev
0c9610641c Fix Attributes values shall be ordered by position when retrieved (#26446)
* Fix Attributes values shall be ordered by position when retrieved from the table

The order of attribute values can be modified manually. This is recorded via the "position" key in the table "llx_product_attribute_value".
However, this order is not taken into account when the attribute values are retrieved via the function fetchAllByProductAttribute() from ProductAttributeValue.class.php

* correction d'une coquille
2023-11-03 16:32:31 +01:00
Laurent Destailleur
c2bdb3be90 Fix php8.2 warnings 2023-10-15 18:41:39 +02:00
Laurent Destailleur
91fa48199a Fix warnings 2023-09-10 17:41:22 +02:00
Laurent Destailleur
7ce9bf6b23 Clean code 2023-08-05 15:44:28 +02:00
Laurent Destailleur
e16d944284 Clean code 2023-05-30 13:37:56 +02:00
Laurent Destailleur
e2ec34e1e5 Clean code 2023-05-01 14:33:08 +02:00
Laurent Destailleur
8e98e506f0 Merge pull request #23975 from frederic34/variantdoc
doc
2023-02-20 21:15:57 +01:00
Frédéric FRANCE
3a94290ef7 doc 2023-02-20 20:43:23 +01:00
Frédéric FRANCE
c8de4a35f0 doc 2023-02-20 20:38:10 +01:00
Laurent Destailleur
236b3aa9e8 Revert default type of hooks. Default is now 'addreplace' hooks (and
exception become 'output' hooks, that become deprecated).
2023-01-14 12:28:44 +01:00
Laurent Destailleur
43a0ccce2b Clean code 2023-01-04 11:37:24 +01:00
Laurent Destailleur
ba6374e6be Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into develop 2023-01-03 15:31:00 +01:00
Laurent Destailleur
8d4e973e00 Fix warnings 2023-01-03 15:29:49 +01:00
Laurent Destailleur
8a4613176c Fix warnings 2022-12-28 16:26:07 +01:00