Commit Graph

236 Commits

Author SHA1 Message Date
MDW
469ced0a8d Qual: Fix phan notices (ticket,variants,webhook) 2025-02-20 10:29:39 +01:00
MDW
24fa28dfe2 Qual: Fix getKanban phpdoc
# Qual: Fix getKanban phpdoc

Array phpdoc for getKanban corrections.
2025-02-05 01:43:37 +01:00
Laurent Destailleur (aka Eldy)
732f97d73c Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2025-02-05 00:40:06 +01:00
MDW
133c67510c Qual: Fix phpstan, remove useless test that price_var_percent is array 2025-01-20 16:47:29 +01:00
Laurent Destailleur (aka Eldy)
fa9fe2efa7 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-01-20 15:02:37 +01:00
Laurent Destailleur (aka Eldy)
c9ab22782e Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2025-01-20 14:57:45 +01:00
Laurent Destailleur (aka Eldy)
1f360ca498 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-01-20 12:28:49 +01:00
Laurent Destailleur (aka Eldy)
3ab49cf061 Debug v21 - Standardize code and translation of RefExt 2025-01-12 18:08:25 +01:00
Marc de Lima Lucio
ef564caf28 FIX: qual 2025-01-07 17:37:30 +01:00
Marc de Lima Lucio
3ef6299c83 FIX: phpcs 2025-01-07 17:20:57 +01:00
Marc de Lima Lucio
ec58ee940a FIX: product variants copy: also copy multiprice variations 2025-01-07 17:09:48 +01:00
Laurent Destailleur (aka Eldy)
1d194efc3d Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-01-05 18:43:15 +01:00
Regis Houssin
367173a4d1 FIX clean unique extrafields when create product combination 2025-01-04 08:20:18 +01:00
Laurent Destailleur (aka Eldy)
81e64ed9a4 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-12-17 16:59:13 +01:00
Laurent Destailleur (aka Eldy)
91eb9fc9fb Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-12-17 16:54:55 +01:00
Frédéric France
e24ad829f3 fix getPositionOfAttribute 2024-12-14 13:59:56 +01:00
Florian HENRY
f8bd644b58 fix: Variant with multiprice, on creation of variant, percent variation is not save 2024-12-09 17:41:56 +01:00
MDW
ec2a1928ba Qual: Update fields phpdoc to include fields that are defined/used in some cases
# Qual: Update fields phpdoc to include fields that are defined/used in some cases

comment, copytoclipboard, autofocusoncreated are documented and used in some cases for the
$fields definition
2024-12-05 02:36:50 +01:00
Laurent Destailleur
7e8fff6cb0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-11-10 18:28:05 +01:00
Francis Appels
e17eafacb2 FIX select variant by attribute. (#31759)
DISTINCT needs order field in select.
Solved by removing DISTINCT
2024-11-10 18:15:04 +01:00
MDW
278d301f32 Qual: Fix phan/phpstan notices in class files (part 6) (#31634)
* Qual: Fix notices for paymentdonation...workstationusergroup.class

* Qual: Fix PhanPluginRedundantReturnComment, update baseline

* Qual: Complete array phpdoc for properties
2024-11-06 23:57:45 +01:00
Frédéric FRANCE
6dd6ab7906 fix phpstan (#31614)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-10-29 17:40:56 +01:00
Frédéric FRANCE
0b1d243a7a add translations count (#31398) 2024-10-15 15:39:29 +02:00
Laurent Destailleur
046166f483 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-10-14 21:38:12 +02:00
Laurent Destailleur
916014707d Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-10-14 21:18:24 +02:00
Frédéric FRANCE
820333b02f fix variants sql init (#31319)
* fix variants sql init

* add setup

* add setup

* add setup

* update class

* update list

* update list

* update list

* update class

* fix typos

* fix translations

* fix html

* fix update

* fix sql

* fix extrafields

* fix extrafields
2024-10-13 21:08:55 +02:00
MDW
c62e015410 Qual: Fix (propal|facture|contrat|fichinter)/card, commonobject, files.lib/card_presend.tpl (#31087)
# Qual: Fix (propal|facture|contrat|fichinter)/card, commonobject, files.lib/card_presend.tpl

Fix phan notices in these files

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-26 23:01:02 +02:00
Laurent Destailleur
fef73cc6e0 Fix remove not used code 2024-09-01 14:47:31 +02:00
Laurent Destailleur
95f86172d2 Fix CTI error 2024-08-31 19:46:00 +02:00
Laurent Destailleur
650ecc23bd Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-31 12:14:06 +02:00
Laurent Destailleur
bc21b973ca Debug v20 2024-08-31 11:45:42 +02:00
Laurent Destailleur
dcfaae3bd5 Clean code: fight against global vars 2024-08-27 06:20:04 +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
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
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
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
MDW
6a98adcc3c Qual: Further phpdoc fixes for phpstan (#30506)
* Fix int<0> typing to int<0,0> for phpstan

* Fix phpdoc for phpstan

* Fix phpdoc for phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-01 13:25:01 +02:00
MDW
46eb5f83c2 Qual: Updates for phpstan notices (#30509)
* Fix int<0> typing to int<0,0> for phpstan

* Fix phpdoc for phpstan

* Fix phpdoc for phpstan

* Qual: Several phpstan notice fixes

* Fix phpdoc

* Qual: totalpaid is never null, remove null test

* improve phpdoc typing

* Also return null to statisfy phpstan

* Allow null value for $var

* object->Object to make it meaningful

* Type EvalMathStack properties

* Comment out unused private methods (phpstan)

* Changes for phpstan (return values, phpdoc, code)

* Change order of tests for phpstan

* phpdoc object to Object for correct typing

* Typing hing for phpstan

* UPdate test for phpstan

* Change phpdoc position for phpstan

* Update phpdoc for phpstan

This needs further improvement

* Change $op to $ope to fix phpstan

* Update sqlite3.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-01 12:59:45 +02:00
Frédéric FRANCE
173dc1a70e fix constructor expects int (#30512)
* constructor expects int

* fix constructor expects int

* fix constructor expects int

* fix constructor expects int

* fix constructor expects int

* fix constructor expects int

* fix constructor expects int

* fix constructor expects int

* fix constructor expects int

* fix constructor expects int

* fix constructor expects int

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-01 10:52:53 +02:00
Laurent Destailleur
2068f29b44 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-01 10:51:25 +02:00
Laurent Destailleur
6210c2429a Fix phan 2024-08-01 10:50:52 +02:00
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
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