Commit Graph

406 Commits

Author SHA1 Message Date
Frédéric FRANCE
bae0c17811 clean code (#29800)
* clean code

* clean code

* clean code

* clean code

* clean code

* clean code

* Update adherent.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-05-31 15:09:41 +02:00
Laurent Destailleur
31a626b34d Fix phan 2024-05-31 14:59:16 +02:00
Laurent Destailleur
326e611851 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-05-29 14:46:55 +02:00
Laurent Destailleur
66fdf21939 Doc 2024-05-29 14:12:19 +02:00
Laurent Destailleur
45e8ed9b36 Doc 2024-05-29 14:12:09 +02:00
Laurent Destailleur
86ac5328cf Doc 2024-05-29 14:07:11 +02:00
Laurent Destailleur
73e0dcabd3 Fix error code 2024-05-29 13:58:51 +02:00
Laurent Destailleur
ccb0ae04e4 API is not working, so we rename it to allow use of another one that can
work correcly.
2024-05-29 13:51:00 +02:00
Laurent Destailleur
a357ed308a Fix for #29777. Explain how to use produceAndConsume MO API. 2024-05-29 13:43:16 +02:00
Laurent Destailleur
59ae417912 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-05-23 12:52:28 +02:00
Laurent Destailleur
481fec5291 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-05-21 20:12:45 +02:00
atm-adrien
133bf3ffb8 FIX : mo cloning (#29686) 2024-05-15 15:06:14 +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
b5de782c6b Fix use the good HTTP code 2024-04-07 14:59:25 +02:00
Laurent Destailleur
fd9475be03 Use same doc comment eveywhere. 2024-04-07 12:26:27 +02:00
Frédéric FRANCE
7cf6a0821f fix phpdoc for ismultientitymanaged (#29245)
* fix phpdoc

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-06 17:38:39 +02:00
Laurent Destailleur
38fb00489d PHPDoc 2024-04-05 13:44:59 +02:00
Laurent Destailleur
7715513ac9 Some API HTTP return code were moved from 401 to 403 to better follow
REST specification.
2024-04-02 14:47:49 +02:00
Laurent Destailleur
990216b13f NEW Api parameters are sanitized by the WAF, same code than GET/POST 2024-04-02 13:07:13 +02:00
Laurent Destailleur
7b0177a84d Move to getDolGlobalString 2024-03-22 00:37:56 +01:00
MDW
67f43f0558 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:38 +01:00
MDW
794dc257c7 Fix PhanTypeSuspiciousStringExpression 2024-03-19 02:43:47 +01:00
MDW
fd9d48faac Fix phpstan CommonObject->fields - notnull is optional field 2024-03-19 00:32:00 +01:00
MDW
23785393a3 Add csslist to json keys 2024-03-15 03:55:52 +01:00
MDW
628ddbda14 Fix PhanTypeMismatchPropertyDefault 2024-03-15 03:54:00 +01:00
Laurent Destailleur
f1a8d712fb Merge branch 'develop' into fix-warnings-and-trad-not-showing 2024-03-15 00:23:54 +01:00
Lamrani Abdel
b818a6a137 Fix return type in getAllMochilds (PHPStan warnings) 2024-03-14 15:52:37 +01:00
Hystepik
3668efcd90 fix warnings phpstan 2024-03-13 15:34:29 +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
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
868c52dd1d Qual: Fix PHPdoc to match parent & default to match doc 2024-03-11 23:46:48 +01:00
MDW
c7221ff338 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:39:54 +01:00
MDW
8602ca9885 Fix: implode->join and duplicated if condition (#28761)
* Fix: join->implode

# Fix: join->implode

Update new cases of join

* Fix: Duplicate if condition in if/else sequence

# Fix: Duplicate if condition in if/else sequence

Fixed repeated if condition and action
2024-03-11 12:55:55 +01:00
Laurent Destailleur
f32bf4b3a7 Fix join -> implode 2024-03-11 12:38:21 +01:00
Laurent Destailleur
0887664888 NEW: All fetchAll() method now support the USF syntax. 2024-03-11 11:23:34 +01:00
Laurent Destailleur
38618b405c Clean code 2024-03-09 02:52:09 +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
Laurent Destailleur
c544efec7f QUAL: Remove use of customurl filter. Must use the USF syntax. 2024-03-05 03:51:36 +01:00
Laurent Destailleur
301bec664a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-03-03 19:59:34 +01:00
Frédéric FRANCE
16319e5103 fix codespell (#28594) 2024-03-03 15:48:36 +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
Laurent Destailleur
1d86c88c38 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-01 20:27:55 +01:00
Laurent Destailleur
b870a84d8a FIX #28564 2024-03-01 20:19:37 +01:00
Laurent Destailleur
6e7263a047 Revert "FIX #28533 Mo::deleteLine removes the "main" MoLine if consumed line …" (#28564)
This reverts commit c069f3f161.
2024-03-01 19:25:06 +01:00
Christian Humpel
c069f3f161 FIX #28533 Mo::deleteLine removes the "main" MoLine if consumed line is delete (#28535)
* fix #28533

* qual for github actions

* fix use $this->db in classes

---------

Co-authored-by: christian.humpel <christian.humpel@gmail.com>
2024-03-01 12:47:37 +01:00
Bahfir Abbes
ef05096297 Fix:False constant name (#28532)
Conflicts:
	htdocs/mrp/class/mo.class.php

Fix:False constant name
2024-02-29 20:19:46 +01:00
Bahfir Abbes
59b0d6ca1b Fix:False constant name (#28532)
Fix:False constant name
2024-02-29 20:15:23 +01:00
Laurent Destailleur
9d48dcbd3d Fix phpstan 2024-02-22 01:32:55 +01:00
Laurent Destailleur
7c1cce7bf0 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-02-18 15:45:54 +01:00
Laurent Destailleur
da9b9370bf Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-02-18 15:41:18 +01:00