2
0
forked from Wavyzz/dolibarr
Commit Graph

1484 Commits

Author SHA1 Message Date
Laurent Destailleur
6a0678e717 Merge branch 'develop' into PhanTypeInvalidRightOperandOfNumericOp 2024-03-23 17:36:29 +01:00
Laurent Destailleur
f7323cd7bf Update list.php 2024-03-23 16:30:46 +01:00
MDW
c517a8008a Fix PhanTypeInvalid{Left,Right}OperandOfNumericOp mostly by typing, casting, idate 2024-03-23 02:06:48 +01:00
Hystepik
7054f90d76 Fix expensereport bad search_user 2024-03-22 15:38:10 +01:00
MDW
08733e8aed Fix a final left add operand typing issue + some typos 2024-03-22 09:52:43 +01:00
MDW
1164ba68d5 Fix labelStatus typing, casts for typing, PHPdoc 2024-03-22 09:52:40 +01:00
MDW
a853f8e6be Fix type with cast/idate/phpdoc 2024-03-22 09:52:23 +01:00
MDW
1e0f368d6a 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:16 +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
9b2c6e2afb Fix arg type to preg_match(),preg_replace() with cast 2024-03-20 04:09:28 +01:00
Laurent Destailleur
5d073ac208 Fix hasRights into hasRight 2024-03-19 22:02:42 +01:00
MDW
a46dfec5c6 Fix return type for deleteLine 2024-03-19 00:32:05 +01:00
MDW
fd9d48faac Fix phpstan CommonObject->fields - notnull is optional field 2024-03-19 00:32:00 +01:00
Frédéric France
17ea003a69 fix phpstan 2024-03-17 21:20:36 +01:00
Frédéric France
26303dc4d3 fix phan 2024-03-17 13:21:34 +01:00
Frédéric France
5e5995731d fix phan 2024-03-17 13:17:51 +01:00
Frédéric France
912be1e1bd fix phan 2024-03-17 13:15:37 +01:00
MDW
71a32b8a52 Merge branch 'develop' into fix/file_ref 2024-03-16 23:36:17 +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
ebd531e308 Fix use array instead of fileinfo
# Fix use  array instead of fileinfo

Detected with PhanTypeSuspiciousStringExpression, seperate PR
because of functional impact (to check)
2024-03-16 21:03:20 +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
Laurent Destailleur
0ee6fd6bad Merge pull request #28877 from mdeweerd/PhanTypeMismatchDefault
Fix & enable PhanTypeMismatchDefault
2024-03-15 15:44:30 +01:00
Laurent Destailleur
33656f26c9 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-15 15:22:07 +01:00
Laurent Destailleur
e3c4c1aff0 Fix warning 2024-03-15 15:16:22 +01:00
Laurent Destailleur
1a722fa436 Merge branch 'develop' into fix/PhanTypeMismatchPropertyProbablyReal 2024-03-15 15:07:35 +01:00
MDW
8495a75f43 Fix PhanTypeMismatchDefault by removing defaults, update typing
Also remove some unused references to globals
2024-03-15 14:53:01 +01:00
MDW
59abbda92f Fix Assign 0 to fk_bank not null (dolibarr's way) 2024-03-15 10:12:01 +01:00
Laurent Destailleur
470e68829d Merge branch 'develop' into fix/PhanTypeInvalidUnaryOperandNumeric 2024-03-15 10:03:50 +01:00
MDW
23785393a3 Add csslist to json keys 2024-03-15 03:55:52 +01:00
MDW
6b0f48ade7 Fix PhanTypeMismatchPropertyDefault 2024-03-15 03:48:16 +01:00
MDW
a12553944a Fix PhanTypeMismatchPropertyDefault 2024-03-15 03:48:15 +01:00
Laurent Destailleur
8a37c7dcb0 Merge pull request #28838 from lamrani002/FixFk_bank
FIX variable assignement for PHPStan warnings
2024-03-14 22:51:04 +01:00
Frédéric France
f36cd6a281 fix phpstan is incompatible with 2024-03-14 20:22:03 +01:00
MDW
69be3bbca6 Fix PhanTypeInvalidUnaryOperandNumeric & remove from exceptions
# Fix PhanTypeInvalidUnaryOperandNumeric & remove from exceptions

Fix by casting result of date() or by adding typing hints.

(This notification indicates a unary '-' or similar is performed
on a value that may not be a number).
2024-03-14 19:39:49 +01:00
Lamrani Abdel
21b291a87a FIX variable assignement for PHPStan warnings 2024-03-14 15:21:39 +01:00
Frédéric FRANCE
5bbab794fa fix expensereport setdraft 2024-03-13 11:20:37 +01:00
Frédéric FRANCE
c8046e4cdd fix expensereport setdraft 2024-03-13 11:18:50 +01:00
Laurent Destailleur
996f915192 Merge pull request #28798 from frederic34/expensereport_story
fix phpdoc
2024-03-12 22:18:22 +01:00
Frédéric France
c6654fcd70 fix phpdoc 2024-03-12 21:55:40 +01:00
Frédéric France
51ff132107 fix phpdoc 2024-03-12 21:44:49 +01:00
MDW
06868badf8 Fix PhanPluginMixedKeyNoKey by using explicit keys 2024-03-12 21:35:47 +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
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
fb730e2c5b Qual: set default value to match PHPdoc type 2024-03-11 22:05:24 +01:00
MDW
b04317adb6 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:32 +01:00
MDW
61f9bd468d 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:30 +01:00
MDW
dbfb1180ee Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions (#28749)
# Qual: Fix PhanPluginDuplicateIfStatements & remove exceptions

Fix occurences of PhanPluginDuplicateIfStatements which are if statements where the
consecutive branches execute the same code, making it useles to test the condition
2024-03-11 12:58:51 +01:00
MDW
310550f676 Fix: Ensure string type for urlencode() 2024-03-09 16:55:54 +01:00