Commit Graph

117 Commits

Author SHA1 Message Date
MDW
67d932e7de Qual: Fix phpdoc for *ArrayMethod* args/return values (non api_) (#31719) 2024-11-08 14:43:12 +01: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
Laurent Destailleur
9ad71b980a NEW Can choose the zip handler to build ODT 2024-10-16 20:46:52 +02:00
Frédéric FRANCE
797bfb27e0 fix phpstan (#30881)
* fix phpstan

* fix phpstan
2024-09-09 02:28:35 +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
Laurent Destailleur
7226c7c25a Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-11 18:30:27 +01:00
Laurent Destailleur
c2602eadf7 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-03-11 18:29:07 +01:00
Laurent Destailleur
330abe14fe FIX Option MAIN_DOC_USE_TIMING can be a string with date format 2024-03-11 18:28:20 +01:00
Laurent Destailleur
0ec6c6f0ea Fix use log instead of fatal error 2024-02-18 23:49:23 +01:00
MDW
cb382eabe1 Fix: PhanParamSignatureMismatch (#28143)
* Fix: PhanParamSignatureMismatch

# Fix: PhanParamSignatureMismatch

PhanDoc was updated to require specific types which changes the method signature
versus the parent.
This results in a signature mismatch.
Updated to maintain the method signature but dynamically check that
the object type is correct.

* Update pre-commit for php-cs
2024-02-18 23:46:30 +01: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
Laurent Destailleur
9e1b90e4a1 Fix with php-cs-fixer 2023-12-04 12:07:31 +01:00
Laurent Destailleur
53dab922fd Fix php8.2 warnings 2023-11-27 11:39:32 +01:00
Laurent Destailleur
b546e7c624 css 2023-09-10 20:24:58 +02:00
Laurent Destailleur
24040c78bb Tooltip for help in ODT doc generation setup is now clickable 2023-08-18 01:46:54 +02:00
Laurent Destailleur
a4d04b84f5 css 2023-08-18 01:06:47 +02:00
Laurent Destailleur
707d853e84 Clean code 2023-08-10 11:29:09 +02:00
Laurent Destailleur
df76b9940d Debug v18 2023-08-05 13:27:56 +02:00
Florian HENRY
ce10c68d31 getDol rather than ->global 2023-06-08 22:38:11 +02:00
Frédéric FRANCE
c61d96c98f put phpmin info in one place 2023-05-31 09:31:22 +02:00
Laurent Destailleur
a64ed59e18 Merge 2023-02-23 22:25:56 +01:00
Laurent Destailleur
0b4cacd291 Use dolChmod 2023-02-17 20:01:53 +01:00
Marc de Lima Lucio
5feb334da2 Merge branch '17.0' of https://github.com/Dolibarr/dolibarr into 15.0_FIX_PHP8_compatibility 2023-02-14 09:16:43 +01:00
Marc de Lima Lucio
1e53f87d51 FIX: various PHP8 compatibility fixes 2023-02-08 12:18:46 +01:00
Laurent Destailleur
57358b618b Clean code 2022-12-31 17:08:10 +01:00
Laurent Destailleur
8774f4f092 Fix warning qodana 2022-12-31 13:44:11 +01:00
Laurent Destailleur
2dffe3748d Debug v17 - Fix missing delete picto on ODT setup 2022-11-18 13:41:27 +01:00
Frédéric France
c7ee2f413c min php version is 7.0 2022-09-27 20:48:47 +02:00
Philippe GRAND
f7d3090d2d add translation 2022-08-02 12:33:24 +02:00
Laurent Destailleur
8ee30e067f Rename var 2022-06-20 02:23:37 +02:00
Laurent Destailleur
e97f021380 Fix #yogosha11295 2022-06-19 19:02:16 +02:00
Laurent Destailleur
308e7a3d9b Fix scrutinizer 2022-05-18 12:40:44 +02:00
Laurent Destailleur
dee5d8f9e8 Standardize name of button 2022-02-18 13:45:28 +01:00
Laurent Destailleur
0037ee2254 Fix ckeditor plugins 2022-01-01 19:37:53 +01:00
Laurent Destailleur
962ac263ba Fix look and feel v15 2021-11-27 15:29:48 +01:00
Laurent Destailleur
b4cfe35138 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop 2021-10-05 13:39:46 +02:00
Laurent Destailleur
b11dbf069e FIX Bad use of a forced contact of another company on PDF/ODT documents 2021-10-05 13:11:54 +02:00
Christian Foellmann
f094b4c70c fix up most of the remaining submit inputs 2021-08-24 17:04:17 +02:00
Frédéric FRANCE
6fb17b9777 fix warnings 2021-06-20 18:28:25 +02:00
Philippe GRAND
fb13d74467 internationalization 2021-06-20 11:56:49 +02:00
Laurent Destailleur
e3e2dfd764 Fix generation of ODT (test if temporary directory is writable) 2021-06-20 05:11:46 +02:00
Laurent Destailleur
8b9af8f5ab Responsive 2021-06-13 01:27:04 +02:00
Laurent Destailleur
8a62d97b89 Remove one thousand of useless files 2021-04-12 15:57:16 +02:00
UT from dolibit
2a069a0a2c Create index.html 2021-03-21 21:19:12 +01:00
Frédéric FRANCE
a4e25359e7 add missing rule 2021-03-01 20:37:16 +01:00
Frédéric FRANCE
554e449e40 code syntax core directory 2021-02-23 22:03:23 +01:00
Philippe GRAND
44f2269764 standardization, internationalisation 2021-02-09 14:19:17 +01:00
Philippe GRAND
8fd7d3e586 standardization, internationalisation 2021-02-09 14:18:27 +01:00
Laurent Destailleur
9c759e91f0 Fix debug management of docs in ticket module 2020-12-16 19:01:26 +01:00