Commit Graph

2433 Commits

Author SHA1 Message Date
Laurent Destailleur
714dc0c4b3 Try to exclude phan 2024-11-14 00:06:45 +01:00
Laurent Destailleur
4415246d46 Exclude dir for phan 2024-11-14 00:03:31 +01:00
Frédéric FRANCE
e5320c2302
fix phpstan (#31801)
* fix phpstan

* fix phpstan

* fix phpstan

* add phpdoc

* add phpdoc

* add phpdoc

* add phpdoc

* add phpdoc

* add phpdoc
2024-11-13 21:21:15 +01:00
MDW
56dc321665
Qual: Fix phan notices (in order of appearance) (#31768)
* Qual: Fix phan notices (in order of appearance)

* Qual: Fix phan notices (in order of appearance)/2
2024-11-12 00:35:14 +01:00
Frédéric FRANCE
273386f52f
display fichinter rec link (#31767)
* display fichinter rec link

* display fichinter rec link

* display fichinter rec link

* display fichinter rec link

* display fichinter rec link

* display fichinter rec link
2024-11-11 18:26:57 +01:00
MDW
9ec4618199
Qual: Fix FunctionArray phan notices (#31754)
* Qual: Fix FunctionArray phan notices

* Fix class name in typing of htdocs/modulebuilder/index.php

* Fix customreports phpdoc

* Adjust file type after completeFileArrayWithDatabaseInfo

* Further phpdoc typing improvements

* More phpdoc

* Improve typing with cast on position field

* Force phpstan version

* Add phpstan exception

* Fix array index type + adjust phan config comment
2024-11-11 14:48:18 +01:00
Frédéric FRANCE
661059ca9a
fix phpstan (#31763)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-11 14:33:53 +01:00
MDW
67d932e7de
Qual: Fix phpdoc for *ArrayMethod* args/return values (non api_) (#31719) 2024-11-08 14:43:12 +01:00
Frédéric FRANCE
4f777f58dc
fix ecmfile tooltip (#30993)
* Update ecmfiles.class.php

* Update ecm.lang

* Update ecmfiles.class.php

* add translations

* wip

* wip

* enhance tooltip

* fix

* fix

* fix

* fix ajaxtooltip

* fix picto

* fix picto

* fix sql

* tooltip

* tooltip

* test
2024-11-07 05:07:41 +01:00
MDW
278d301f32
Qual: Fix phan/phpstan notices in class files (part 6) (#31634)
* Qual: Fix notices for paymentdonation...workstationusergroup.class

* Qual: Fix PhanPluginRedundantReturnComment, update baseline

* Qual: Complete array phpdoc for properties
2024-11-06 23:57:45 +01:00
MDW
178d748cad
Qual: Fix phan/phpstan notices in class files (part 5) (#31617)
* Qual: fix commonstickergen..don.class

* Fix notifications for pdf_paiement...cronjob.class

* Qual: Fix notifications for emailcollector..price_parser.class

* Ensure that NULL is used in the database when fk's are 0/empty

* Fix notifications for pdf_paiement...cronjob.class

* Cope with updated phpstan, and make fk_origin_stock int in multiple locations
2024-11-06 20:15:15 +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
e7539f2e19
Qual: Fix notices in .lib.php files (#31672)
* Qual: Fix notices in .lib.php files

* Update wrapper.php

* Update availabilities_card.php

* Update index.php

* Update document.controller.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-04 12:32:13 +01:00
MDW
f4ff437026
Qual: Fix phan/phpstan notices in class files (part 4) (#31598)
* Qual: Fix phan notices for DolibarrModules.class

* Qual: Fix notices for classes actioncomm..task.class.php

* fixup! Qual: Fix notices for classes actioncomm..task.class.php

* Qual: Fix new notices blocking PR
2024-10-30 21:33:30 +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
Frédéric FRANCE
fd7ac6f8e2
Update ignore_translation_keys.lst (#31604)
* Update ignore_translation_keys.lst

* Update setup.php
2024-10-28 14:41:04 +01:00
Laurent Destailleur
829edfe651 Debug v21 2024-10-28 12:12:27 +01:00
Laurent Destailleur
850f1ef143
Update README.md 2024-10-27 23:02:45 +01:00
sonikf
1778e56745
NEW: PDF add discount total if line discount exists (#31483)
* NEW: PDF add total discount if line discount exists

* NEW: PDF add total discount if line discount exists

* NEW: PDF add discount total if line discount exists

* NEW: PDF add discount total if line discount exists

* NEW: PDF add discount total if line discount exists

* NEW: PDF add discount total if line discount exists

* php doc

* Add missing translation

* fix missing translation
2024-10-26 18:29:06 +02:00
MDW
67e9eaff46
Qual: Fix phan/phpstan notices in class files (part 2) (#31523)
* Qual: Fix phan notices in class files (part 2)

* Qual: Fix phan notices doleditor...events.class

* Qual: Fix phan notices defaultvalues...formprojet.class

* Qual: Fix notices formsetup...formwebsite.class

* Qual: Fix phan notices in class files (part 2)

* Qual: Fix phan notices doleditor...events.class

* Qual: Fix phan notices defaultvalues...formprojet.class

* Qual: Fix notices formsetup...formwebsite.class
2024-10-26 18:24:40 +02:00
MDW
0ac595364b
Qual: Fix phan/phpstan notices in class files (part 1) (#31501)
* Ignore phpstan configuration for spelling

* Qual: Fix phan notices in class files
2024-10-25 21:00:02 +02:00
MDW
acda13eddf
Qual: Fix phan/stan notices for facture-rec.class (#31489)
* Qual: Fix phan/stan notices for facture-rec.class

* Update fournisseur.facture-rec.class.php

* Update fournisseur.facture.class.php

* Update fournisseur.facture-rec.class.php

* Update fournisseur.facture-rec.class.php

* Update fournisseur.facture-rec.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-25 17:11:39 +02:00
MDW
fcd680d300
Qual: Fix phan & phpstan notices (#31496)
# Qual: Fix phan & phpstan notices

Fix multiple phan & phpstan notices
2024-10-25 14:20:55 +02:00
MDW
28e78d6cb4
Qual: Fix phan/stan notices for conferenceorbooth, facture-re, productcustomerprice (#31541) 2024-10-25 14:18:17 +02:00
Laurent Destailleur
9a6ec3b059 CSS 2024-10-25 13:47:24 +02:00
MDW
f3dc9a9e45
Qual: fix phan notices in interface_50_modAgenda_ActionsAuto.class (#31478)
# Qual: fix phan notices in interface_50_modAgenda_ActionsAuto.class

Fix several notices in interface_50_modAgenda_ActionsAuto.class with typing hints.
2024-10-24 01:32:10 +02:00
MDW
76d801dcb3
Qual: Fix phan by adding typing hints, fix arguments (#31466)
* Do not analyze custom

* Update baseline, ignore everything in custom

* Qual: Fix notices in files related to ticket class

* Qual: Add typing hints to tpl files + other 'fixes'

* Qual: fix typing issu gy typing intermediate variable
2024-10-20 01:57:12 +02:00
MDW
fb3972b702
Qual: Fix phan notices in some payment/strip related classes (#31453)
* fix concat

* fix overwrite

* Clean code

* Do not analyze custom

* Update baseline, ignore everything in custom

* Qual: Fix notices in files related to ticket class

* Qual: Fix companybankaccount.class

* Fix phan/phpstan notices

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
Co-authored-by: Frédéric FRANCE <frederic.france@free.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-20 00:32:01 +02:00
MDW
11c43e8c63
Fix: ticket.class phan/phpstan notices (#31448)
* Qual: Fix ticket.class notices

* Do not analyze custom

* Fix: Correct reference to cache (+phpdoc)

* Update baseline, ignore everything in custom

* Qual: Fix notices in files related to ticket class
2024-10-19 01:21:41 +02:00
MDW
cee4535975
Qual: Fix phan notices in admin.lib and tax.lib + related (#31414)
* Qual: Fix admin.lib phpstan/phan notices

* Qual: Fix some argument types in Societe methods

* Fixup phpdoc

* Qual: Improve typing for static analysis

* Qual: Improve typing for static analysis

* Fix tax typing

* Qual: further phan/phpstan notice fixes in dol_generic_project_odt

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-17 03:08:38 +02:00
MDW
8a9f86e109
Qual: Suppress PhanTypeSuspiciousNonTraversableForeach (#31382)
# Qual: Ignore PhanTypeSuspiciousNonTraversableForeach

PhanTypeSuspiciousNonTraversableForeach reports on the use of
`foreach ($object as $key => value)` which is valid accross
tested php versions (at least since PHP7.0).

So suppressing this notice.
2024-10-17 01:54:19 +02:00
MDW
9677a370e9
Qual: Nullable mysoc hint (#31393)
* Qual: Nullable mysoc hint

# Qual: Nullable mysoc hint

$mysoc can be nullable resulting in issues (#31387) so
it is best to detect these cases with static analysis

* Prevent null assignment
2024-10-17 01:44:54 +02:00
MDW
cad13e85e3
Qual: Fix smtps.class (#31403)
# Qual: Fix smtps.class

Fix most phan notices in smtps.class
2024-10-15 15:49:41 +02:00
MDW
0524358377
Qual: Fix phan notices in dolgraph class (#31399)
# Qual: Fix phan notices in dolgraph class

This fixes most notices in the dolgraph class.
2024-10-15 15:46:19 +02:00
MDW
53cfbc35be
Qual: Fix several phan & stan notices (#31308)
* Qual: Fix several phan & stan notices

# Qual: Fix several phan & stan notices

Several fixes in files while fixing UnknownClass notices

* Qual: Update prepare_head PHPDoc return types

# Qual: Update prepare_head PHPDoc return types

Provide detailed array return types for prepare_head functions.

* Fix new phan notice

* Better loadLangs typing and fix call to loadLangs

* Fix new issues (stats)

* Other fixes of new issues

* Qual: update phan baseline
2024-10-14 01:59:44 +02:00
MDW
8609df383a
Qual: fix phan notices (#31368)
* Qual: fix phan notices

# Qual: fix phan notices

Fix phan/phpstan notices, mostly in html,formmail

* Ignore phpstan exception
2024-10-14 00:36:42 +02:00
Laurent Destailleur
a255e9b5c8 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-10-13 20:58:40 +02:00
MDW
523d472962
ci: Automatically determine version for upgrade sequence (#31344)
* ci: Automatically determine version for upgrade sequence

This automatically determines the version for the upgrade process
to help avoid editing the scripot on version upgrades.

* Include filefunc.inc.php to md5sum, remove old som computation
2024-10-13 17:29:56 +02:00
MDW
d7b2f95baf
Qual: Fix phan notices (#31372)
* fix llx_webhook_target-webhook.sql

* Fix commande/list & facture-rec.class

* Fix bonprelevement

* Qual: Fix prelevement/create notices

* Qual: fix quadridetail notices & update baseline

* Qual: Fix CommonDocGenerator notices

* Qual: Fix commoninvoice and commonobjectline notices (phan/phpstan)

---------

Co-authored-by: Frédéric FRANCE <frederic34@users.noreply.github.com>
2024-10-13 16:45:42 +02:00
MDW
c9690393bc
Fix undefined global varialbe user/card.php (#31353)
# Fix undefined global varialbe user/card.php

Fix a few issues, one of which noticed in V21 UI.

Also notified by phan:
```
htdocs\user\card.php:626 PhanUndeclaredGlobalVariable Global variable $mesgs is undeclared
htdocs\user\card.php:2967 PhanUndeclaredGlobalVariable Global variable $soc is undeclared

```
2024-10-11 16:05:37 +02:00
MDW
9c20e93860
Fix: Cope with undevined country key in search array. (#31354)
# Fix: Cope with undefined country key in search array

Fix:
```
htdocs\partnership\partnership_list.php:533 PhanUndeclaredProperty Reference to undeclared property \Partnership->login
htdocs\partnership\partnership_list.php:793 PhanTypeMismatchArgumentProbablyReal Argument 4 ($filter) is null of type null but \FormAdmin::select_language() takes array|string[] (no real type) defined at htdocs\core\class\html.formadmin.class.php:74 (the inferred real argument type has nothing in common with the parameter's phpdoc type)
```
2024-10-11 16:04:46 +02:00
MDW
bde0f0d794
Qual: Fix ci (phpstan notice) (#31301)
# Qual: Fix ci (phpstan notice)

While fixing the ci notice, also fixed the array definitions
which fixes both phan notices and phpstan notices seen on cti.
Removed the exception for phan on this file
2024-10-07 15:44:06 +02:00
MDW
f4c91d5bb6
Qual: Fix phan/phpstan notices (#31297)
# Qual: Fix phan/phpstan notices

Fix several phan and phpstan notices.
2024-10-07 14:07:24 +02:00
MDW
0c26110636
Qual: Fix notices related to user classes (#31291)
# Qual: Fix notices related to user classes

This fixes several notices related to user classes (and reveals
some actual bugs or inconsistent typing).
2024-10-06 13:52:05 +02:00
MDW
34e3717dda
Qual: Fix phan/phpstan notices (#31289)
* Qual: Fix phan/phpstan notices

# Qual: Fix phan/phpstan notices

Fix several phan/phpstan notices

* Fix spelling in Changelog
2024-10-06 13:03:43 +02:00
MDW
f70c945931
Qual: Fix phan/stan notices (#31271)
Some checks are pending
CI / pre-commit (push) Waiting to run
CI / phan (push) Blocked by required conditions
CI / phpstan (push) Blocked by required conditions
CI / windows-ci (push) Blocked by required conditions
CI / gh-travis (push) Waiting to run
# Qual: Fix phan/stan notices in relation with UnknownObjectMethodCall

Fix notices in classes with UnknownObjectMethodCall notices or classes
related with these.
2024-10-05 18:55:36 +02:00
Laurent Destailleur
965558e309 Clean trans
Some checks are pending
CI / pre-commit (push) Waiting to run
CI / phan (push) Blocked by required conditions
CI / phpstan (push) Blocked by required conditions
CI / windows-ci (push) Blocked by required conditions
CI / gh-travis (push) Waiting to run
2024-10-04 19:30:34 +02:00
Frédéric FRANCE
8305c35b6b
fix phpdoc (#31262)
* fix phpdoc

* fix phpdoc
2024-10-04 09:40:05 +02:00
MDW
1834c37c16
Qual: Fix phan notices (#31212)
* Qual: Fix phan notices

# Qual: Fix phan notices

Fix several phan notices related to classes with UnknownObject
classes.

* Qual: Fix phan notices

* Qual: Fix phan notices

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-10-03 19:40:34 +02:00
MDW
2d0b1de36f
Qual: Add codespell entries to catch some css typos (#31222)
# Qual: Add codespell entries to catch some css typos

Added some codespell entries based on the observed typos in css
tags
2024-10-03 19:36:59 +02:00