Commit Graph

2409 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
Laurent Destailleur
0b9bd5408b Debug v20: Encapsulate the feature using leaflet/geophp into a constant
MAIN_USE_GEOPHP. Fix webportal module.
2024-05-03 02:39:35 +02:00
Laurent Destailleur
e3daa23949 Look and feel v20 2024-04-30 09:45:28 +02:00
Laurent Destailleur
1908d6cf98 Look and feel v20 - All combo of categories are using the colored picto 2024-04-24 02:40:53 +02:00
Laurent Destailleur
2f7e9734bd Debug v20 2024-04-23 00:38:56 +02:00
Laurent Destailleur
60c0fc2386 Fix warning PHP 8.2 2024-04-22 18:42:34 +02: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
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
Laurent Destailleur
38fb00489d PHPDoc 2024-04-05 13:44:59 +02:00
Laurent Destailleur
14afdf6b0e Fix regression on GETPOSTINT 2024-04-03 17:50:24 +02:00
Laurent Destailleur
fffe74246c Fix all short tables must use the setup for the number of rows 2024-04-03 15:30:10 +02:00
Laurent Destailleur
c64bba12ee Merge pull request #29171 from JonBendtsen/contact_update_single_array_option_element
allow updating contract single Complementary Attribute
2024-04-02 14:49:35 +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
2dc3306e70 Merge branch 'develop' into contact_update_single_array_option_element 2024-04-02 13:38:45 +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
Jon Bendtsen
0d4ef406c4 will allow updating 1 contract single Complementary Attribute without specifying complementary attributes that we don't want to change. Similar to # 29115 but just for contracts 2024-04-01 11:02:29 +02:00
Laurent Destailleur
233629ed3a Merge branch 'develop' into phpstan_user 2024-03-29 12:20:23 +01:00
Laurent Destailleur
b58e439a17 Clean use of $_POST 2024-03-28 21:29:02 +01:00
Frédéric France
7a7b1953ed fix phpstan 2024-03-28 20:34:33 +01:00
Laurent Destailleur
3e8c3edd6d Clean code from _GET 2024-03-28 17:10:22 +01:00
Laurent Destailleur
a7e33e6573 Merge pull request #29047 from mdeweerd/fix/PhanPluginUnknownObjectMethodCall1
Fixes for PhanPluginUnknownObjectMethodCall
2024-03-28 14:20:57 +01:00
Laurent Destailleur
22aa30bd3c Debug v20 2024-03-28 12:44:14 +01:00
MDW
d0631e60bf Force typing (phan) for typing checks 2024-03-27 10:18:07 +01:00
MDW
c16a4f5951 Fix PhanNonClassMethodCall with extra test 2024-03-24 15:40:23 +01:00
MDW
58ca5d112d Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, casting, idate 2024-03-23 02:06:34 +01:00
Laurent Destailleur
7b0177a84d Move to getDolGlobalString 2024-03-22 00:37:56 +01:00
MDW
6a14a8304d 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:10 +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
4d4d3ba175 Fix arg type to preg_replace(),preg_match(),trim() with cast + phpdoc 2024-03-20 04:08:41 +01:00
MDW
05fbb7257c Fix arg type to preg_replace() with cast 2024-03-20 04:08:40 +01:00
MDW
f74273cdec Fix arg type for trim by casting to string 2024-03-19 20:38:47 +01:00
MDW
fd9d48faac Fix phpstan CommonObject->fields - notnull is optional field 2024-03-19 00:32:00 +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
MDW
13ab939691 Fix deprecated function calls 2024-03-16 13:27:51 +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
61e05a9fde Fix Typing on $fields for 2nd class in file
# Fix Typing on $fields for 2nd class in file

This fixes the PHPstan notification for the $fields property of the
second CommonObject subclass in the files.

Example: 'PHPDoc type array of property BOMLine::$fields is not covariant with PHPDoc type array of overridden property CommonObject::$fields.'
2024-03-15 17:10:30 +01:00
Laurent Destailleur
1a722fa436 Merge branch 'develop' into fix/PhanTypeMismatchPropertyProbablyReal 2024-03-15 15:07:35 +01:00
evarisk-micka
d43c3227db Add signed status CRUD to contract and fichinter 2024-03-15 12:12:21 +01:00
MDW
23fecf4524 Fix Add to errors, not error which is not an array 2024-03-15 10:11:53 +01:00
MDW
23785393a3 Add csslist to json keys 2024-03-15 03:55:52 +01:00
MDW
27fc56c70a Fix PhanTypeMismatchPropertyDefault 2024-03-15 03:48:09 +01:00
MDW
d199883ec1 Fix PhanPluginDuplicateExpressionAssignment (NOOP assignment) 2024-03-12 22:25:35 +01:00
MDW
d66937c65b Fix PhanPluginDuplicateExpressionAssignment (NOOP assignment) 2024-03-12 22:25:34 +01:00
MDW
43ba3df82e Fix PhanPluginMixedKeyNoKey by using explicit keys 2024-03-12 21:35:46 +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
MDW
640eb1b75d 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:11 +01:00
MDW
b72cf193c4 Fix some cases of PhanTypeSuspiciousStringExpression (#28751)
* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

* Fix PhanTypeSuspiciousStringExpression

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-11 14:01:28 +01:00