Commit Graph

576 Commits

Author SHA1 Message Date
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
bd170e0474 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-11-12 11:33:31 +01:00
Frédéric FRANCE
1adc883b56 add baseline exclude for phpstan (#31632)
* add baseline exclude for phpstan

* update

* update

* update

* update

* update

* merge

* restore one filter

* delete old errors

* fix

* fix

* fix

* $moreforfilter can t be empty

* fix

* enable check

* refresh baseline

* add phpdoc

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* update phpstan baseline

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-04 23:53:20 +01:00
MDW
b91c99b18a Qual: Fix phan/phpstan notices in class files (part 3) (#31578)
* fix phpstan in conf class (#31630)

* fix phpstan

* fix phan

* Fix merge

* Qual: Avoid notification with typing hint

* Qual: Fix notices link.class

* Qual: Fix notices link..socialneetworkmanager.class and DoliDb->DoliDB

* Qual: Fix notices for link..utils.class

* Qual: Fix notices for db classes

* Update translate.class.php

* Update translate.class.php

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: Laurent Destailleur <eldy@users.sourceforge.net>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-29 22:44:47 +01:00
Laurent Destailleur
e6f1d4835f Clean sql code 2024-10-29 02:58:20 +01:00
Laurent Destailleur
4db9323706 Fix phan 2024-10-20 00:03:46 +02:00
Laurent Destailleur
c70973c0c8 Merge v20 2024-10-19 14:44:55 +02:00
Laurent Destailleur
c9ed9bb6eb FIX Avoid fatal error when mysqli not available 2024-10-18 23:48:24 +02:00
Laurent Destailleur
471668b940 FIX Toolt to convert utf8mb4 2024-09-30 23:12:01 +02:00
Laurent Destailleur
4a3d081dca FIX Toolt to convert utf8mb4 2024-09-30 23:11:31 +02:00
MDW
42bb4fbf3e Qual: Enable & fix or ignore Invalid DimOffset (#31176)
* Qual: Enable & fix or ignore Invalid DimOffset

# Qual: Enable & fix or ignore Invalid DimOffset

The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.

This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later

* Nullable object typing in function signature not ok for 7.0/8.4

Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-29 21:52:31 +02:00
Laurent Destailleur
96046c40a8 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-27 16:13:39 +02:00
John BOTELLA
25754d87c9 FIX : FATAL ERROR abusively triggered due to incomplete regex (#31052)
* Fix regex detection

* New regular expression to include offset
2024-09-26 22:38:38 +02:00
Laurent Destailleur
3bf7bab967 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-12 02:21:46 +02:00
Laurent Destailleur
a52963020d Doc 2024-09-12 02:21:14 +02:00
Laurent Destailleur
b1ee18864f Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-12 01:43:43 +02:00
Laurent Destailleur
cbf3cbfa1f Better debug log 2024-09-12 01:33:58 +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
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
Charlène Benke
1a3dddb3cc FIX sanitize must allow space on attribute (#30566)
sanitize must allow space on attribute

otherwhise  "on update CURRENT_TIMESTAMP" for tms fields goes wrong
2024-08-11 00:02:05 +02:00
MDW
d6948077b2 Qual: Fix spelling/update .pre-commit configuration (versions) (#30546)
* Qual: Update pre-commit configuration

* Qual: Update spelling

* Ignore use of deprecated constant
2024-08-07 01:20:43 +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
Charlène Benke
0a2d4bee75 FIX sanitize must allow space on attribute (#30490)
* sanitize must allow space on attribute

otherwhise  "on update CURRENT_TIMESTAMP" for tms fields goes wrong

* Update mysqli.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-07-31 15:41:00 +02:00
Frédéric FRANCE
fbbdf7fb3e fix cti (#30323) 2024-07-09 19:29:35 +02:00
Laurent Destailleur
bd2a0b9e55 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-06-25 15:13:51 +02:00
Frédéric FRANCE
e57e99fe19 fix warning with pgsql DoliDB.class.php (#30153) 2024-06-25 15:12:03 +02:00
jyhere
88a294df22 CHANGE: add a notice in getRows() instead of returning false (#29790)
* CHANGE: add a notice  in getRows() instead of returning false

* CHANGE: replace notice by a fatal error when using getRows with no limit
2024-06-03 18:03:17 +02:00
Laurent Destailleur
629ccf9681 Merge branch 'FIX_Entity_on_workstation' of
github.com:ATM-Consulting/dolibarr into
ATM-Consulting-FIX_Entity_on_workstation
2024-05-23 13:02:07 +02:00
Laurent Destailleur
271624de1b Debug v20 2024-05-15 18:04:52 +02:00
Laurent Destailleur
b1f4f09b1c Code comment 2024-05-06 18:25:06 +02:00
Frédéric FRANCE
f8ea179029 fix phan (#29519) 2024-04-28 17:38:54 +02:00
Laurent Destailleur
8963940c20 Fix phan 2024-04-28 17:38:39 +02:00
Laurent Destailleur
f9fbbb2706 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-04-28 17:36:44 +02:00
Laurent Destailleur
2aea004cba Fix phan 2024-04-28 17:36:33 +02:00
Frédéric FRANCE
f1dc60dcc7 fix phan (#29514)
* Update product_lot.php

* Update replenishment.lib.php

* Update product.class.php

* Update product.class.php

* fix phan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-28 17:25:15 +02:00
Laurent Destailleur
d1d68fdf8a Fix phan 2024-04-28 17:24:31 +02:00
Laurent Destailleur
6358f89c0d Fix phan warnings 2024-04-28 17:10:51 +02:00
Laurent Destailleur
55c8048639 Try to fix phan warnings 2024-04-28 13:02:49 +02:00
Frédéric FRANCE
82d63247d7 fix phpstan pgsql.class.php (#29511)
* fix phpstan pgsql.class.php

* Update Database.interface.php

* fix phan

fix phan

fix phan

* fix phan

* fix phan

* fix phan

* fix phan

fix phan

fix phan

fix phan

fix phan

* fix phan

* fix phan

* fix phan

* fix phan
2024-04-27 22:01:34 +02:00
Laurent Destailleur
a9f5b5c227 Doxygen 2024-04-27 18:08:13 +02:00
Laurent Destailleur
2691603345 Doxygen 2024-04-27 18:04:27 +02:00
MDW
bc5e5b67af Qual: Update phan baseline (#29300)
* Qual: Update phan baseline

* Init variable to ensure it is defined

* Init $module_part to ensure it is defined

* Init $modulepart to ensure it is defined

* phpdoc typing for getNetNeeds and getNetNeedsTree

* Enforce type for phan

* Initialise  $massactionbutton so that it is defined

* phpdoc: improve typing

* Encore character_set value is string (for typing)

* fixup! Qual: Update phan baseline

* Fix duplicate code

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-12 01:06:52 +02:00
Laurent Destailleur
132595f10f CSS customreport 2024-04-10 01:38:36 +02:00
Frédéric FRANCE
00b2185813 fix phpstan (#29258)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan
2024-04-07 11:50:26 +02:00
MDW
c7560a7c89 Qual: improve typing for jdate
# Qual: improve typing for jdate

Limit jdate return type to int|'' .
Tested with phan and phpstan.
This will allow setting the same type on the date fields and allow
detecting the assignment of non empty strings.

int|''|'specific value'  also works, so could be used on other fields.
2024-04-02 13:40:04 +02:00
Laurent Destailleur
c87f24e3f4 Fix mysqli 2024-03-29 17:09:36 +01:00
Laurent Destailleur
68babcbc46 NEW Add sql stddev_pop db function. 2024-03-29 14:52:27 +01:00
Laurent Destailleur
fbc1890dfc Remove deprecate. Seems not possible to depreciate a new function
without adding comment on each call.
2024-03-24 00:38:08 +01:00
Laurent Destailleur
ce274c403e Depreciate a method usage 2024-03-23 19:06:54 +01:00
Laurent Destailleur
51322707e9 Try to fix phpunit with pgsql 2024-03-22 02:44:55 +01:00