2
0
forked from Wavyzz/dolibarr
Commit Graph

1116 Commits

Author SHA1 Message Date
MDW
5c5ad3260c Fix PhanNonClassMethodCall with extra test 2024-03-24 15:40:21 +01:00
MDW
c4fe7773cb Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, casting, idate 2024-03-23 02:06:21 +01:00
MDW
e44e29c446 Fix $mybool |=... which is binary op, not boolean op
# Fix $mybool |=... which is binary op, not boolean op

This fixes PhanTypeInvalidLeftOperandOfBitwiseOp.
Replace $var |= ... with $var = ... || $var .
Add cast before ... when needed (@include does not always return bool).
|= always evaluates expression, there for || $var, not $var ||
2024-03-21 13:45:03 +01:00
Laurent Destailleur
43d1d33e0d Update propal.class.php 2024-03-20 04:08:43 +01:00
MDW
1303b0fe76 Fix arg to preg_replace() with cast, fix PHPdoc, Add FIXME
The handling of special_code seems suspicious -> FIXME
2024-03-20 04:08:28 +01:00
MDW
c5479f4520 Fix: Update typing for qty as float 2024-03-19 20:37:38 +01:00
MDW
fd9d48faac Fix phpstan CommonObject->fields - notnull is optional field 2024-03-19 00:32:00 +01:00
Laurent Destailleur
e15f243e95 Clean code - Remove a deprecated tag that should not exists. 2024-03-16 11:51:32 +01:00
MDW
23785393a3 Add csslist to json keys 2024-03-15 03:55:52 +01:00
MDW
00e65bb09d Fix PhanTypeMismatchPropertyDefault 2024-03-15 03:44:44 +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
Laurent Destailleur
a0b26ae7cd FIX Amount of localtaxes in foreign currency was wrong on screen and PDF 2024-03-13 22:04:44 +01:00
MDW
fb2aadf006 Fix PhanPluginRedundantAssignment 2024-03-13 00:40:36 +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
ed703c7241 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:38:55 +01:00
JeromeBARBOTIN
5371db3c0b FIX: Verification of variables (#28623)
* Verifcation of variables

Modification of the variable setting before its use.

* To check if the property exists

* Modification as per @frederic34 suggestion

* Update propal.class.php

* Application of coding rules

Modification of the called function.

* Verification of variables

* Verification of variable

* Typo error

* Update actions_sendmails.inc.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-08 22:50:15 +01:00
Laurent Destailleur
7ab339e97f Fix regression 2024-03-08 17:54:32 +01:00
Frédéric FRANCE
fba15178eb all initAsSpecimen return int (#28577)
* all initAsSpecimen return int

* all initAsSpecimen return int

* all initAsSpecimen return int
2024-03-02 16:38:35 +01:00
MDW
c332251816 Fix: Replace deprecated module names in code strings (#28462)
* Fix: Replace deprecated module names in code strings

# Fix: Replace deprecated module names in code strings

A few cases that slipped through the manual replacements

* Qual: Enable deprecation notices in CodingPhpTest for isModEnabled

# Qual: Enable deprecation notices in CodingPhpTest for isModEnabled

As all detections are now fixed, we can enable the deprecation notice
trigger in the CodingPhpTest.
2024-02-28 23:01:01 +01:00
Goldron
6876f9fcc3 Fixes an error by initializing ->line in the insert_discount method. (#28407)
* Fixes an error by initializing ->line in the insert_discount method.

* Update propal.class.php

---------

Co-authored-by: David IGREJA <david@siladel.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-25 09:58:24 +01:00
thibdrev
d4faa5e2b5 qual: phpstan - Property CommonObjectLine::$fk_unit (int|null) does not accept string|null. (#28372)
* Update propal.class.php

htdocs/comm/propal/class/propal.class.php	746	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/comm/propal/class/propal.class.php	963	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

* Update commande.class.php

htdocs/commande/class/commande.class.php	1692	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/commande/class/commande.class.php	3273	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

* Update facture.class.php

htdocs/compta/facture/class/facture.class.php	3990	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/compta/facture/class/facture.class.php	4243	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

* Update fournisseur.commande.class.php

htdocs/fourn/class/fournisseur.commande.class.php	2149	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/fourn/class/fournisseur.commande.class.php	3031	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

* Update fournisseur.facture.class.php

htdocs/fourn/class/fournisseur.facture.class.php	2257	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.

htdocs/fourn/class/fournisseur.facture.class.php	2453	Property CommonObjectLine::$fk_unit (int|null) does not accept string|null.
2024-02-23 17:13:15 +01:00
thibdrev
40450e4313 qual: phpstan for htdocs/comm/propal/class/propal.class.php (#28034)
* qual: phpstan for htdocs/comm/propal/class/propal.class.php

htdocs/comm/propal/class/propal.class.php	75	Property Propal::$table_element_line (int) does not accept default value of type string.
htdocs/comm/propal/class/propal.class.php	1414	Property CommonObject::$fk_delivery_address (int) does not accept string.
htdocs/comm/propal/class/propal.class.php	1426	Property CommonObject::$fk_project (int) does not accept string.
htdocs/comm/propal/class/propal.class.php	1499	Property CommonObject::$user_author (User) does not accept int.

* Update propal.class.php

use $object->user_creation_id rather than $object->user_author
2024-02-08 00:22:11 +01:00
Laurent Destailleur
1d6cbe1fda Fix GETPOST use should be avoid in classes 2024-02-02 23:46:12 +01:00
Frédéric France
03e29c6960 fix param 2024-01-20 09:22:38 +01:00
Frédéric France
b3bcdeafe5 rename method 2024-01-18 18:55:53 +01:00
MDW
a04f2bf4e7 Qual: Spelling fixes that newly appeared. (#27495)
* Qual: Spelling fixes that newly appeared.

# Qual: Fix spelling erros that appeared since the bulk updates.

These issues mostly appeared since the bulk updates (a few ones were postponed
to make sure no real spelling errors were missed.)

* Update modulebuilder.lib.php

* Update pdf_standard.modules.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-01-14 12:26:37 +01:00
William Mead
e64b942a06 Added status type 2024-01-10 12:33:58 +01:00
William Mead
855723ab40 Added contributor details 2024-01-10 12:28:36 +01:00
William Mead
feba8d3e62 Added canceled status label 2024-01-10 12:26:15 +01:00
William Mead
c691549f43 Refactored code 2024-01-10 09:40:56 +01:00
William Mead
0f2415a75c Added cancel & confirm_cancel actions. Cleaned code. 2024-01-10 09:29:23 +01:00
William Mead
3f1f4829e4 Added cancel status & setCancel method 2024-01-10 09:07:28 +01:00
Laurent Destailleur
910a541c60 Clean code 2024-01-09 13:08:22 +01:00
Laurent Destailleur
4501872f17 Clean code with rector 2 2024-01-05 04:33:58 +01:00
Hystepik
5e4a4da130 Fix some php codce smell 2023-12-20 14:22:45 +01:00
Laurent Destailleur
e145a087fb Merge pull request #27084 from altairisfr/MAIN_IGNORE_CONTACTS_ON_CLONING
add constant MAIN_IGNORE_CONTACTS_ON_CLONING
2023-12-14 01:49:43 +01:00
Christophe Battarel
a65631c355 add constant PROPAL_DISABLE_AUTOUPDATE_ON_CLOSE 2023-12-13 16:49:55 +01:00
Christophe Battarel
a0f097c0a8 add constant MAIN_IGNORE_CONTACTS_ON_CLONING 2023-12-13 16:44:12 +01:00
Frédéric FRANCE
61b79fda17 avoid phpstan error with phpdoc 2023-12-06 15:46:39 +01:00
Laurent Destailleur
ba10d60a0b Fix with php-cs-fixer 2023-12-04 12:02:35 +01:00
Frédéric FRANCE
53c8a3acf8 clean phpdoc for phpstan (#26905) 2023-12-01 19:51:32 +01:00
Laurent Destailleur
53dab922fd Fix php8.2 warnings 2023-11-27 11:39:32 +01:00
Laurent Destailleur
7659bba97a Fix bad delete of lines into llx_ecm_files 2023-11-13 12:24:47 +01:00
Laurent Destailleur
c154a72d88 Debug v19 2023-11-06 19:32:04 +01:00
Laurent Destailleur
127de7e7d8 FIX On object validation, ecm index are not updated for uploaded files 2023-11-01 16:17:54 +01:00
Laurent Destailleur
74e1ec4099 FIX On object validation, ecm index are not updated for uploaded files 2023-10-31 19:28:11 +01:00
Laurent Destailleur
d3c9549154 Comment dead code 2023-10-26 01:36:44 +02:00
Laurent Destailleur
a318031034 QUAL Standardize code. Renamed ID of user properties into ->user_xxx_id 2023-10-24 11:37:29 +02:00
Laurent Destailleur
e1bf377f20 QUAL: Removed deprecated field remise, remise_percent, remise_absolute 2023-10-20 10:47:08 +02:00