Commit Graph

56 Commits

Author SHA1 Message Date
Laurent Destailleur (aka Eldy)
568a7723c9 Fix phan 2025-02-07 14:16:48 +01:00
Laurent Destailleur (aka Eldy)
0b67bf4dad Fix phan 2025-02-07 13:00:24 +01: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
Laurent Destailleur
613c25b5ff Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-09-10 02:02:16 +02:00
Laurent Destailleur
870a5248ec Trans 2024-09-10 01:33:23 +02:00
Laurent Destailleur
001dc9378f Fix phan 2024-09-04 22:10:33 +02:00
MDW
75ed925f06 Qual: Fix PhanPluginUnknownObjectMethodCall ("part 1") (#30563)
* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add typing hint to fix phan notice.

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add typing hint in phan config to fix phan notice.

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint to fix phan notice.

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for linkedObjectBlock

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for linkedObjectBlock

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for linkedObjects

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

# Qual: Fix PhanPluginUnknownObjectMethodCall (add typing hints)

Add/improve typing hint for PhanPluginUnknownObjectMethodCall

* Fix: MemberNumRefNumbers getExample does not take any arguments

Found thanks to adding the typing for phan!

* Qual: Correct forced type for $module

* Qual: Ignore phan false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Ignore false positive

* Qual: phan/Ignore false positive, replace depr.prop with method

* Qual: Fix typing for count by adding is_array check

* Qual: replace depr.prop `nom` with method

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Fix depr.prop with getter and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: phan/Correct module type and ignore false positive

* Qual: Improve typing for mymodule template

* Make info method arguments match calls

* Make PrintingDriver abstract class because we added abstract methods

* Add phpdoc typing for phan

* Update getExample function signature for compatibility

* Update getExample function signature for compatibility

* Update getExample function signature for compatibility

* Update header wit correct information

* Update getExample method signature

* Update getExample method signature

* Correct reference to class in comment

* Force php phan typing for numbering modules

* Correct $_GLOBALS to $GLOBALS

* Add phpdoc to indicat type of properties

* Correct default to null

* Improve getNextValue typehint

* Improve getNextValue typehint

* Qual: Improve ModeleNumRefTakepos typing

* Qual: Improve ModeleNumRefRecruitmentJobPosition typing

* Fix default for $langs

* Do not use non-existing ModeleNumRefTakepos::nom

* Allow getNextValue argument to be null

* Correct $_GLOBAL into $GLOBALS

* Improve typing for ldap functions

* Allow null for outputlangs argument

* Improve typing for printOriginLine

* Improve typing for linkedObject access

* Fix PhanTypeMismatchArgumentNullableInternal and optimize

* Fix PhanPossiblyUndeclaredVariable by setting default value

* Ignore PhanPluginDuplicateExpressionAssignmentOperation - needs PHP7.4

* getToolTip does not accept null, changed to ''

* Improve getNextValue typing

* Change PrintingDriver back to normal class (instantiated)

And add errors for functions that should be overloaded

* Adjust pringOriginLine typing to match parent

* Fix phpdoc for getNextValue

* Fix phan typing

* Add/Improve phpdoc typing hints

* Qual: Adjustments to match typing

* Update typing for unit, use GETPOSTINT

* ModeleNumRefTask needs Project

* Fix several notices appearing after update from develop

* Index for choices is int, use GETPOSTINT

* Qual: Ignore empty foreach

* Force BOMLine on object line

* phan typing to indicate that linked objects are BOM

* Type the correct variable name (phan)

* Add typing for $langs

* Type to CommonNumRefGenerator (no class for availabilities)

* Resolve several phan notices after update from dev branch

* Extra typing fixes

* Move common attributes to parent class (phan)

* Add typing to Calendar class

* Improve typing hints

* Add typing to pdf_eagle_proforma

* Qual: Add typing for token in generic_oauthcallback.php

* Add typing for objMod

* Correct getNextValue function signature (phpstan)

* Fix typing (phpstan)

* Update version declarations (fix phpstan)

* Fix phpstan typing issues

* Adjust typing (phpstan)

* Qual: Update baseline & conf to detect 25% of PhanPluginUnknownObjectMethodCall
2024-08-17 19:32:52 +02:00
MDW
3d04a7195c Qual: Updates regarding write_file(s) methods for Phan (#30511)
* Fix phpdoc for phpstan

* Add abstract write_file to ModelePDFContract

And update phpdoc for derived classes

* Fix typing for php_standard_actions writefile

* Improve phpdoc for write_files (& related)

* Add abstract write_file to ModelePDFBom

* Add abstract write_file to ModelePDFDeliveryOrder

* Add abstract write_file to ModeleExpenseReport

* Add abstract write_file to ModelePDFFicheinter

* Add abstract write_file to ModelePDFEvaluation

* Add abstract write_file to ModelePDFFactures

* Add abstract write_file to ModelePDFSuppliersInvoices

* Update ModelePDFProjects and ModelePDFTask related classes

* Qual: Add abstract write_file to ModelePdfExpedition

And update phpdoc for derived classes

* Qual: Correct reference (doc) to ModelePDFEvaluation

* Qual: Add abstract write_file to ModelePDFKnowledgeRecord

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFMo & ModelePDFMouvement

And update phpdoc for derived classes

* Qual: Set typehint to ModelePDFFicheinter

* Qual: Add abstract write_file to ModelePDFCommandes

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFPropales

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePdfReception

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFSuppliersOrders

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFSuppliersOrders

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFSuppliersPayments

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFSupplierProposal

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFWorkstation

And update phpdoc for derived classes

* Set typing for doc generator (commonobject)

* Improve typing for write_file

* Set typing for doc generator

* Qual: Add abstract write_file to ModelePDFMember

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFProduct

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFProductBatch

And update phpdoc for derived classes

* Qual: Add abstract write_file to ModelePDFRecruitmentJobPosition

And update phpdoc for derived classes

* Add abstract write_file to ModelePDFTicket

* Add abstract write_file to ModelePDFUser

* Add abstract write_file to ModelePDFUserGroup

* Add abstract write_file to ModeleThirdPartyDoc

* Add abstract write_file to ModelePDFAsset

* Find all incompatible classes

* Qual: update phan baseline

* Set typing for doc generator (commonobject)

* Qual: update phan baseline

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-14 19:21:10 +02:00
MDW
89004f7e03 Qual: Spelling htdocs/core (#27491)
Highlights:
- initialY in pdf_standard.modules.php was unused
  - remove (otherwise -> initially) (+same in other file)
2024-01-13 19:48:20 +01:00
MDW
39769482b1 Qual: Fix typing hints for DoliDB (#27484)
# Qual: Fix typing hints for DoliDB

This should help the static tools for type and method checking.
2024-01-13 15:50:02 +01:00
Laurent Destailleur
db2a70b86a NEW Factorize a lot of code for numbering modules 2023-08-09 14:50:28 +02:00
Laurent Destailleur
da1d622f80 Fix warnings 2023-08-06 00:41:59 +02:00
Laurent Destailleur
57358b618b Clean code 2022-12-31 17:08:10 +01:00
Frédéric FRANCE
42cf7acfe5 doc translation 2022-12-21 17:26:16 +01:00
Frédéric FRANCE
f11418c108 doc translation 2022-12-21 17:23:33 +01:00
Frédéric FRANCE
690562c22e add numbering modules for members 2022-12-21 16:43:38 +01:00
Lamrani Abdel
33c0cfcbf3 fix issue in with addin version attribute module_project 2022-11-10 14:15:21 +01:00
Frédéric FRANCE
554e449e40 code syntax core directory 2021-02-23 22:03:23 +01:00
Philippe GRAND
2fc6d76029 standardization, internationalisation 2021-02-09 14:09:02 +01:00
Laurent Destailleur
86481d16d0 Clean code 2020-11-13 15:02:49 +01:00
Scrutinizer Auto-Fixer
7f52920716 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2020-10-31 13:32:18 +00:00
Scrutinizer Auto-Fixer
444c293c01 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2020-04-10 08:59:32 +00:00
Laurent Destailleur
e6641b5369 Fix doc 2020-04-03 18:01:54 +02:00
Alexandre SPANGARO
02dbc11f98 Move Gnu.org to https 2019-09-23 21:55:30 +02:00
Alexandre SPANGARO
3ddd123eb1 Traduction 2019-09-08 05:18:52 +02:00
Alexandre SPANGARO
d9fa32b555 Traduction 2019-09-08 05:00:24 +02:00
Frédéric FRANCE
c5c27fdb77 add visibility 2019-03-01 19:24:06 +01:00
Frédéric FRANCE
796ea6f4ea add visibility 2019-02-28 23:19:58 +01:00
Frédéric FRANCE
b10558bacd Merge remote-tracking branch 'upstream/develop' into nospaceaftercomma 2019-01-27 23:23:38 +01:00
Frédéric FRANCE
f0cdf300d1 Squiz.Functions.FunctionDeclarationArgumentSpacing 2019-01-27 15:20:16 +01:00
Frédéric FRANCE
7ee086b402 PSR2 space after comma in function call 2019-01-27 11:55:16 +01:00
Regis Houssin
569d59d251 FIX change my deprecated email 2018-10-27 14:43:12 +02:00
Frédéric FRANCE
3847df1de6 move phpcs:ignore 2018-09-04 21:53:53 +02:00
Frédéric FRANCE
6b6daf178f Merge remote-tracking branch 'upstream/develop' into camelCaps 2018-08-21 20:57:58 +02:00
Philippe GRAND
edb566501d Update and standardize code 2018-08-17 18:54:41 +02:00
Frédéric FRANCE
850ac34020 mark non camelCaps function 2018-08-13 17:26:32 +02:00
Marcos García de La Fuente
8225b06018 NEW Removed commande_pdf_create, contract_pdf_create,expedition_pdf_create, facture_pdf_create, delivery_order_pdf_create, task_pdf_create, project_pdf_create, propale_pdf_create, supplier_invoice_pdf_create, supplier_order_pdf_create, supplier_proposal_pdf_create deprecated functions 2017-01-16 21:59:02 +01:00
Raphaël Doursenaud
3f9270ea78 Qual: added deprecation hinting
Added deprecation hinting for class properties
Added syslog warning events for deprecated functions, methods and/or their parameters
Added hinting for some constants
2015-06-01 11:00:11 +02:00
Scrutinizer Auto-Fixer
b693ed3f51 Scrutinizer Auto-Fixes
This commit consists of patches automatically generated for this project on https://scrutinizer-ci.com
2015-03-16 23:21:17 +00:00
Marcos García de La Fuente
e71dc6bc32 Created a method generateDocument for several classes
Which are: Commande, Contrat, Livraison, Facture, Projet, Propal, Task, Expedition, CommandeFournisseur, FactureFournisseur and therefore deprecated the following methods supplier_order_pdf_create, supplier_invoice_pdf_create, delivery_order_pdf_create, task_pdf_create, propale_pdf_create, project_pdf_create, facture_pdf_create, expedition_pdf_create, commande_pdf_create
2014-09-16 12:30:37 +02:00
Laurent Destailleur
a26a7cedf8 Qual: Uniformize code. Trigger PROJECT_BUILDDOC is removed because
building a doc is not a business event. For technical action after
creation of a pdf, hook "afterPDFCreation" must be used instead.
2014-08-19 14:51:10 +02:00
Regis Houssin
68aca6f2bb Fix: project builddoc trigger is used now 2014-08-18 08:40:35 +02:00
BENKE Charles
fa75ef3b57 made change on all the modules_element definition 2014-06-21 00:35:11 +02:00
Raphaël Doursenaud
c48c3a9d91 Qual: remove PHP closing tag (again)
These were reintroduced by careless merge
2014-05-26 13:51:25 +02:00
Regis Houssin
fcee35c65d Fix: $hookmanager is a global object 2013-01-26 10:35:30 +01:00
Laurent Destailleur
8d206fdfb0 Prepare move to other licence. For the moment all answers for licence
upgrade were not yet received. So we prepare for GPL by uniformizing
licence text keys to GPL-3+. Will move later to AGPL if all answers are
positive.
2013-01-16 15:36:08 +01:00
Regis Houssin
b838895db9 Fix: change for a neutral email 2012-12-30 15:13:49 +01:00
Marcos García
9b3c89ac47 Removed parenthesis from all include and include_once and replaced with single quotes 2012-08-23 02:40:41 +02:00
Marcos García
706d79986c Removed parenthesis from all require_once and replaced with single quotes 2012-08-22 23:11:24 +02:00
Regis Houssin
e49df57667 Fix: compatibility with php 5.4 and E_STRICT mode 2012-04-14 15:04:46 +02:00