Commit Graph

14 Commits

Author SHA1 Message Date
MDW
c92b87dfec Qual: (commonnumrefgenerator): Add abstract method getExample (#36271)
- `getExample()`: Returns an example of the numbering format

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-11-17 22:03:08 +01:00
Laurent Destailleur
c98273fed1 Fix phan error; Currently getExample has different signature defined
into parents
2024-09-03 17:59:06 +02:00
Laurent Destailleur
4f93bc7d09 Try to fix fatal PHP error 2024-08-17 22:47:59 +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
Laurent Destailleur
8265bdedcb Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-05-10 12:03:33 +02:00
Benjamin Falière
ca744d907c FIX: langs overwrite (#29630)
* FIX: langs overwrite

* ChangeLog typo

---------

Co-authored-by: Benjamin Falière <benjamin.faliere@altairis.fr>
2024-05-07 20:27:59 +02:00
MDW
13ab939691 Fix deprecated function calls 2024-03-16 13:27:51 +01:00
Frédéric France
aaf173a0d2 clean code and phpdoc 2024-03-11 21:01:20 +01:00
Frédéric FRANCE
3c055f671e fix phpstan (#28545)
* fix phpstan

* fix phpstan
2024-03-01 12:51:48 +01:00
thibdrev
b0658c48f0 qual: phpstan - Property mod_xxxx::$code_modifiable (string) does not accept int. (#28173)
* qual: phpstan for commonnumrefgenerator.class.php

* qual: phpstan for mod_codeproduct_elephant.php

* qual: phpstan for mod_codeproduct_leopard.php

htdocs/core/modules/product/mod_codeproduct_leopard.php	79	Property mod_codeproduct_leopard::$code_modifiable (string) does not accept int.

* qual: phpstan for mod_lot_free.php

htdocs/core/modules/product_batch/mod_lot_free.php	76	Property mod_lot_free::$code_modifiable (string) does not accept int.

* Update mod_codeclient_elephant.php

htdocs/core/modules/societe/mod_codeclient_elephant.php	46	PHPDoc type int of property mod_codeclient_elephant::$code_modifiable is not covariant with PHPDoc type string of overridden property ModeleThirdPartyCode::$code_modifiable.

* qual: phpstan for mod_codeclient_leopard.php

htdocs/core/modules/societe/mod_codeclient_leopard.php	76	Property mod_codeclient_leopard::$code_modifiable (string) does not accept int.

* qual: phpstan for mod_codeclient_monkey.php

htdocs/core/modules/societe/mod_codeclient_monkey.php	76	Property mod_codeclient_monkey::$code_modifiable (string) does not accept int.

* phpcs

* phpcs

* phpcs

* qual: phpstan for modules_societe.class.php

* Update mod_lot_free.php
2024-02-15 14:59:07 +01:00
Laurent Destailleur
6d63f464bb Fix php inherit 2023-08-09 18:18:20 +02:00
Laurent Destailleur
15ddb9a3a8 Fix inherit of CommonNumRef 2023-08-09 17:35:35 +02:00
Laurent Destailleur
db2a70b86a NEW Factorize a lot of code for numbering modules 2023-08-09 14:50:28 +02:00
Laurent Destailleur
7bbaf37ffe Introduce an interface for num ref generators 2023-08-09 14:05:13 +02:00