Commit Graph

40 Commits

Author SHA1 Message Date
MDW
a161c5fb67 Qual: Fix phan notices, update baseline (#35528)
# Qual: Fix phan notices, update baseline

Fix some new phan notices and update baseline
2025-09-28 13:55:39 +02:00
ldestailleur
f2f5f23f8f Fix syntax error 2025-09-17 14:22:53 +02:00
ldestailleur
e0073b000d Debug v23 2025-09-17 14:03:09 +02:00
Frédéric FRANCE
8e0b1eb606 fix object reference (#34928)
* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* merge

* fix doc

* fix doc

* fix doc

* fix doc

* fix doc

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

* fix

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-17 16:32:09 +02:00
ldestailleur
4edb50855f Enhance datapoliciy module 2025-08-15 17:20:28 +02:00
ldestailleur
f4ae5136c8 Debug v23 2025-08-15 16:05:05 +02:00
ldestailleur
03165e5cae Remove duplicate definition table. 2025-07-24 14:42:45 +02:00
VIAL-GOUTEYRON Quentin
5cf613a269 NEW : Major overhaul of DataPolicyCron and add Recruitment policy (#34704)
* refactor(datapolicy): redesign setup and logic for GDPR compliance

- Introduced a data-driven configuration structure for setup.php.
- Added support for a new "recruitment" GDPR datapolicy configuration.
- Streamlined code for managing anonymization and deletion delays.
- Enhanced dropdown generation logic to improve maintainability.
- Simplified data anonymization and deletion methods in cron execution.

This change provides more flexibility and modularity while ensuring compliance with GDPR standards.

* refactor(datapolicy): enhance data cleaning logic and add modular handlers

- Refactored `cleanDataForDataPolicy` method for better readability and efficiency.
- Implemented modular handlers for deletion and anonymization (_handleDelete and _handleAnonymize).
- Added dynamic argument building for method calls based on policy configurations.
- Improved SQL query preparation with placeholders for better database compatibility.
- Enhanced error handling and outcome recording in data processing.

This update simplifies extensibility and ensures robust handling of datapolicies.

* fix precommit

* fix

* fix(datapolicy): resolve uninitialized langs object and improve type hints

- Added a check to ensure `$langs` object is properly initialized, preventing runtime errors.
- Improved type hints in `datapolicycron.class.php` for stronger type checking and clarity.
- Replaced `empty` checks with `isset` for better null safety in setup.php dropdown logic.
- Adjusted SQL placeholders to cast values as strings for compatibility.

These changes enhance code robustness, type safety, and error handling.

* fix(datapolicy): improve type hints and streamline dropdown logic

- Added precise type hints (`string`, `array`) to enhance code clarity and type safety.
- Removed redundant condition in dropdown generation for improved maintainability.
- Added type specification for `$paramName` in `array_map` to strengthen type checking.
- Inserted missing class docblock for `CommonObject` in `datapolicycron.class.php`.

These updates lead to cleaner, safer, and more robust code.

* fix(datapolicy): improve type hints and streamline form submission logic

- Added return type hints (`: int`, `: void`, `: array`) in `datapolicycron.class.php` for better type safety and clarity.
- Simplified loop structures in `setup.php` by removing unnecessary variables.
- Revised `buttonsSaveCancel` method usage to eliminate redundant cancel parameter logic.
- Enhanced maintainability through refactoring `_processPolicyAction`, `_handleDelete`, and `_handleAnonymize` methods.

These refinements improve code readability, maintainability, and robustness.

* refactor(datapolicy): replace custom dropdown generation with `Form::selectarray`

- Removed the custom `$generateSelectHtml` function, simplifying code by using the existing `Form::selectarray` method.
- Updated dropdown generation for 'anonymize' and 'delete' actions to align with Dolibarr's standard practices.
- Enhances maintainability by leveraging built-in utilities and reducing custom logic.

* Update datapolicycron.class.php

* Try to fix CI

* Update datapolicycron.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-07-24 11:41:05 +02:00
Laurent Destailleur (aka Eldy)
4954e84d56 Debug v21 2024-12-30 04:53:07 +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
Laurent Destailleur
c33324210a Clean php code from NOW() in sql 2024-09-05 13:04:13 +02:00
MDW
988cd8a61e Fix/ignore PhanPluginPrintfVariableFormatString 2024-03-17 18:56:39 +01:00
Laurent Destailleur
e6b2756c19 QUAL The signature for all ->delete() method has been modified to match
the modulebuilder template (so first param is now always $user), except
  the delete for thirdparty (still accept the id of thirdparty to delete
as first parameter). Will probably be modified into another version.
2024-03-07 17:58:02 +01:00
Frédéric FRANCE
fba15178eb all initAsSpecimen return int (#28577)
* all initAsSpecimen return int

* all initAsSpecimen return int

* all initAsSpecimen return int
2024-03-02 16:38:35 +01:00
William Mead
4a3b7d581a Qual phpstan DataPolicyCron class (#28163)
* Fixed default anonym values

* Added contributor details

* Cleaned PHPDoc
2024-02-13 21:35:18 +01:00
Laurent Destailleur
0baf8d4117 Fix warnings 2023-08-05 22:57:12 +02:00
Frédéric FRANCE
a20c511ee9 doc 2023-02-22 20:58:55 +01:00
Laurent Destailleur
06d94c9a97 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop 2022-10-19 17:11:32 +02:00
Laurent Destailleur
7c615fafb9 Update datapolicycron.class.php 2022-10-17 23:14:33 +02:00
ptibogxiv
df51c0ea51 Fix php 8 error 2022-10-15 13:07:07 +02:00
Laurent Destailleur
90d58bde27 Clean module datapolicy 2022-09-08 16:19:59 +02:00
Laurent Destailleur
c37ccc10b1 Debug v14 2021-05-11 14:50:04 +02:00
Frédéric FRANCE
ef28a76ad0 code syntax datapolicy dav debugbar directories 2021-02-25 22:09:10 +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
2085ac73e7 Merge remote-tracking branch 'upstream/develop' into Squiz.ControlStructures.ControlSignature.SpaceAfterKeyword 2020-05-23 18:34:58 +02:00
Frédéric FRANCE
b41ac00b98 add new rule 2020-05-21 15:05:19 +02:00
Frédéric FRANCE
43dcd9beb5 add new rule 2020-05-21 00:02:33 +02:00
Frédéric FRANCE
16cc946608 Update datapolicycron.class.php 2020-05-20 20:13:42 +02:00
Laurent Destailleur
b150edd6d0 Merge branch '11.0' of git@github.com:Dolibarr/dolibarr.git into 12.0
Conflicts:
	htdocs/societe/checkvat/checkVatPopup.php
2020-05-15 14:10:53 +02:00
stickler-ci
e691045c3d Fixing style errors. 2020-05-14 23:20:39 +00:00
ptibogxiv
cb98ec4d23 Fix datapolicycron 2020-05-15 01:18:53 +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
Laurent Destailleur
f338a5f9ad Debug module datapolicy 2019-09-06 19:56:00 +02:00
Laurent Destailleur
89e1cdff61 Debug module datapolicy 2019-09-06 19:41:15 +02:00
Frédéric FRANCE
167a857f4c replace html code by html5 in contact 2019-02-24 14:47:47 +01:00
Frédéric FRANCE
273d68381c psr2 end file new line none found 2019-02-03 15:21:21 +01:00
Frédéric FRANCE
86d854f3f4 Squiz.WhiteSpace.ControlStructureSpacing.SpacingBeforeClose 2018-10-24 23:04:26 +02:00
Laurent Destailleur
6d4d8a0342 Dolibarize data privacy policy module 2018-10-15 14:05:54 +02:00