2
0
forked from Wavyzz/dolibarr
Commit Graph

48 Commits

Author SHA1 Message Date
Laurent Destailleur (aka Eldy)
81e64ed9a4 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-12-17 16:59:13 +01:00
Laurent Destailleur (aka Eldy)
91eb9fc9fb Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-12-17 16:54:55 +01:00
Regis Houssin
2ccc6f71ae FIX wrong trigger name (MODIFY instead UPDATE) 2024-12-12 11:58:52 +01:00
MDW
b0087aaf61 Qual: Enable phan on modulebuilder (#30652)
* Allow null for buyer, and force '' for  in printObjectLine(s)

* Allow null for Contact in show_actions_done

* Qual: Enable phan on modulebuilder

# Qual: Enable phan on modulebuilder

Most files of the modulebuilder template can be checked as regular files.
It will help improve the template

* Update baseline (enable modulebuilder notices)

* Add properties that are expected to exist on modules_boxes

* Qual: Ignore false positive (phan)

* Set phpdoc type to include null on formAddObjectLine

* Qual: Fixes for modulebuilder (phan, phpstan, bugs, format)

* Fix phpcs for intracom

* Make ModeleBoxes:showBox() signature match child class's

* Fix *box::showBox() phpdoc types

* Update index.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-08-18 18:16:08 +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
sonikf
a9bfe73e1a Add recurring invoice triggers in module builder template (#29208)
* Add recurring invoice triggers

* Update interface_99_modMyModule_MyModuleTriggers.class.php

* remove BILLREC_CREATE
2024-04-05 16:34:39 +02:00
Laurent Destailleur
f9346a8022 Fix restore declaration to avoid to many uncompatibility problems. 2024-03-18 15:15:35 +01:00
Laurent Destailleur
b72b38f5d1 Doc 2024-03-18 15:03:41 +01:00
Laurent Destailleur
72d758e054 Doc 2024-03-18 14:56:54 +01:00
MDW
5067a8bee9 Fix Dolibarr spellings 2024-03-16 18:11:10 +01:00
William Mead
640774d554 Qual clean dolibarrtriggers (#27968)
* Moved property init to constructor

* Added VERSIONS constant

* Updated code comments

* Refactor to use switch statement

* Added contributor details

* Refactored to use VERSIONS constant

* Added method return & parameter types

* Added getter methods

* Clean code

* Remove runTrigger return type

* Refactored & cleaned code. Added contributor details.

* Refactored modulebuilder trigger interface

* Cleaned code

* Fixed runTrigger types

* Added changelog warning

* Fixed return type

* Fixed return type

* Fixed PHP 7.0 compatibility

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-18 23:54:01 +01:00
MDW
591306d7b1 Qual: Spelling htdocs/[l-o]* & htdocs/pa* (#27435)
# Qual: Fix spelling htdocs/[l-o]* & htdocs/pa*

Mostly comments, some local variables changed and translations to avoid
automatic fixes.

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-01-12 18:06:50 +01:00
Frédéric FRANCE
61b79fda17 avoid phpstan error with phpdoc 2023-12-06 15:46:39 +01:00
Frédéric FRANCE
7760ba86da use isModEnabled 2023-04-18 20:33:36 +02:00
Laurent Destailleur
ea42fc7605 Clean code, fix warnings 2022-12-30 18:43:43 +01:00
Laurent Destailleur
9fa00c1771 Fix trans in comments 2022-10-12 15:29:30 +02:00
Francis Appels
aca6609f21 Close Remove trigger ORDER_SUPPLIER_DISPATCH #18486 2022-08-29 11:36:19 +02:00
Laurent Destailleur
a21f117e78 Log message 2022-08-27 19:23:05 +02:00
Laurent Destailleur
11d18fae4a Clean code 2022-03-11 13:36:58 +01:00
Laurent Destailleur
8dc6241aee Clean dead code 2021-05-17 08:58:02 +02:00
Laurent Destailleur
1d2929e3f5 Clean code 2021-03-15 00:01:55 +01:00
Frédéric FRANCE
f73c0abec1 code syntax m... directories 2021-02-26 18:26:44 +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
Frédéric FRANCE
9c51d467b5 clean triggers 2020-10-26 18:49:38 +01:00
Laurent Destailleur
a32456afc5 Update interface_99_modMyModule_MyModuleTriggers.class.php 2020-10-06 12:35:18 +02:00
stickler-ci
4cbe8d8623 Fixing style errors. 2020-09-21 07:34:00 +00:00
x
2fbb6b1125 new handle trigger method 2020-09-21 09:29:52 +02:00
nervo
ba0ca3f7f7 Reindent module template 2020-05-01 08:40:55 +02:00
Maxime Kohlhaas
7fea2bc557 Update changelog + trigger name change for class UserGroup 2020-04-15 08:44:29 +02: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
Frédéric FRANCE
e75f7d448c Squiz.WhiteSpace.ControlStructureSpacing.SpacingAfterOpen 2019-10-16 20:00:01 +02:00
Alexandre SPANGARO
02dbc11f98 Move Gnu.org to https 2019-09-23 21:55:30 +02:00
Nicolas ZABOURI
cf45bbb698 FIX #11160 2019-05-17 23:50:57 +02:00
Laurent Destailleur
4756499a81 Debug module builder for generation of APIs 2019-05-02 12:03:14 +02:00
Frédéric FRANCE
80a12fcd1c psr2 Squiz.WhiteSpace.ScopeClosingBrace.Indent 2019-02-03 14:29:45 +01:00
Regis Houssin
2b7e15edbd FIX remove old triggers 2018-09-03 09:35:14 +02:00
Laurent Destailleur
bdbe2c02ed Sample 2018-08-31 10:51:32 +02:00
Laurent Destailleur
6e62727c37 Fix scrutinizer bug 2018-06-06 18:18:50 +02:00
Frédéric FRANCE
055508f343 remove one warning 2018-05-27 20:56:45 +02:00
Laurent Destailleur
809ef1bd00 FIX Trigger *_MODIFY must be called when editing a property event extra.
Clean duplicate trigggers "*_CLONE"
2018-02-20 18:09:38 +01:00
Laurent Destailleur
3cfb6aaa67 Fix missing trigger CONTRACT_MODIFY 2018-02-04 12:59:16 +01:00
Frédéric FRANCE
7a76a3f497 fix trigger when module not enabled 2017-11-14 10:20:43 +01:00
Laurent Destailleur
99a27162fb Complete module template 2017-08-24 20:17:23 +02:00
Laurent Destailleur
2141cfb282 Fix code of triggers (disabled if module not enabled) 2017-07-13 11:25:25 +02:00
Laurent Destailleur
8db4e91888 Debug modulebuilder 2017-07-08 15:43:36 +02:00
Laurent Destailleur
c4f09b8894 Work on modulebuilder 2017-05-28 14:43:17 +02:00
Laurent Destailleur
c651f1da45 Work on modulebuilder tool 2017-05-27 19:05:36 +02:00
Laurent Destailleur
dd71fdc82f Work on modulebuilder template 2017-05-08 21:00:23 +02:00