add phpdoc in mailing modules (#31786)
* add phpdoc * add phpdoc * add phpdoc * add phpdoc * add phpdoc * add phpdoc * add phpdoc * add phpdoc * test * test * test * test
This commit is contained in:
parent
2b19f6e065
commit
8c0c033e49
13 changed files with 140 additions and 102 deletions
7
.github/workflows/phpstan_baseline.yml
vendored
7
.github/workflows/phpstan_baseline.yml
vendored
|
|
@ -1,9 +1,9 @@
|
|||
name: 'PHPStan'
|
||||
name: 'PHPStan baseline'
|
||||
|
||||
on:
|
||||
# Every Monday we want to refresh the baseline
|
||||
# Every Thursday we want to refresh the baseline
|
||||
schedule:
|
||||
- cron: '0 6 * * 1'
|
||||
- cron: '0 6 * * 4'
|
||||
|
||||
# We want to be able to manually refresh the baseline too
|
||||
workflow_dispatch:
|
||||
|
|
@ -61,6 +61,7 @@ jobs:
|
|||
commit_message: PHPStan > Update baseline
|
||||
target_branch: develop
|
||||
pr_create: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'schedule') && 1 || 0 }}
|
||||
# pr_create: 1
|
||||
pr_title: PHPStan > Update baseline
|
||||
pr_reviewer: eldy
|
||||
pr_body: |
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ repos:
|
|||
- id: end-of-file-fixer
|
||||
# Check that there are no completely merged file conflicts
|
||||
- id: check-merge-conflict
|
||||
stages: [commit, pre-rebase, pre-commit, pre-merge-commit]
|
||||
stages: [pre-rebase, pre-commit, pre-merge-commit]
|
||||
# Check that files with shebangs have the executable bit set (in git)
|
||||
- id: check-executables-have-shebangs
|
||||
# Check that shell files are executables
|
||||
|
|
@ -252,7 +252,7 @@ repos:
|
|||
rev: 3.1.0
|
||||
hooks:
|
||||
- id: sqlfluff-lint
|
||||
stages: [commit, manual] # manual needed for ci
|
||||
stages: [pre-commit, manual] # manual needed for ci
|
||||
exclude: (?x)^
|
||||
(dev/initdemo/mysqldump_.*\.sql
|
||||
|htdocs/core/menus/init_menu_auguria\.sql
|
||||
|
|
|
|||
|
|
@ -15450,18 +15450,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/core/modules/import/import_xlsx.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_advthirdparties\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/advthirdparties.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_advthirdparties\:\:\$require_module has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/advthirdparties.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_contacts1\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
|
|
@ -15522,60 +15510,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/modules_mailings.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_partnership\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/partnership.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_partnership\:\:\$require_module has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/partnership.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_pomme\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/pomme.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_pomme\:\:\$require_module has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/pomme.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_thirdparties\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/thirdparties.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_thirdparties\:\:\$require_module has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/thirdparties.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_thirdparties_services_expired\:\:\$arrayofproducts has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_thirdparties_services_expired\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_thirdparties_services_expired\:\:\$require_module has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
count: 1
|
||||
path: ../../htdocs/core/modules/mailings/thirdparties_services_expired.modules.php
|
||||
|
||||
-
|
||||
message: '#^Property mailing_xinputfile\:\:\$require_admin has no type specified\.$#'
|
||||
identifier: missingType.property
|
||||
|
|
|
|||
|
|
@ -571,19 +571,19 @@ abstract class CommonObject
|
|||
public $fk_account;
|
||||
|
||||
/**
|
||||
* @var string Public note
|
||||
* @var ?string Public note
|
||||
* @see update_note()
|
||||
*/
|
||||
public $note_public;
|
||||
|
||||
/**
|
||||
* @var string Private note
|
||||
* @var ?string Private note
|
||||
* @see update_note()
|
||||
*/
|
||||
public $note_private;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @var ?string
|
||||
* @deprecated Use $note_private instead.
|
||||
* @see $note_private
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This file is an example to follow to add your own email selector inside
|
||||
* the Dolibarr email tool.
|
||||
|
|
@ -26,11 +27,24 @@ include_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php';
|
|||
*/
|
||||
class mailing_advthirdparties extends MailingTargets
|
||||
{
|
||||
/**
|
||||
* @var string name of mailing module
|
||||
*/
|
||||
public $name = 'ThirdPartyAdvancedTargeting';
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
|
||||
/**
|
||||
* @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
*/
|
||||
public $desc = "Third parties";
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $require_admin = 0;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
public $require_module = array("none"); // This module should not be displayed as Selector in mailing
|
||||
|
||||
/**
|
||||
|
|
@ -38,6 +52,9 @@ class mailing_advthirdparties extends MailingTargets
|
|||
*/
|
||||
public $picto = 'company';
|
||||
|
||||
/**
|
||||
* @var string condition to enable module
|
||||
*/
|
||||
public $enabled = 'isModEnabled("societe")';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -39,6 +40,9 @@ class mailing_contacts1 extends MailingTargets
|
|||
public $require_module = array("societe"); // Module mailing actif si modules require_module actifs
|
||||
public $require_admin = 0; // Module mailing actif pour user admin ou non
|
||||
|
||||
/**
|
||||
* @var string condition to enable module
|
||||
*/
|
||||
public $enabled = 'isModEnabled("societe")';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018-2018 Andre Schild <a.schild@aarboard.ch>
|
||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2018-2018 Andre Schild <a.schild@aarboard.ch>
|
||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This file is an example to follow to add your own email selector inside
|
||||
* the Dolibarr email tool.
|
||||
|
|
@ -31,15 +32,24 @@ class mailing_eventorganization extends MailingTargets
|
|||
public $name = 'AttendeesOfOrganizedEvent';
|
||||
public $desc = "Attendees of an organized event";
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $require_admin = 0;
|
||||
|
||||
public $require_module = array(); // This module allows to select by categories must be also enabled if category module is not activated
|
||||
/**
|
||||
* @var string[] This module allows to select by categories must be also enabled if category module is not activated
|
||||
*/
|
||||
public $require_module = array();
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
*/
|
||||
public $picto = 'conferenceorbooth';
|
||||
|
||||
/**
|
||||
* @var string condition to enable module
|
||||
*/
|
||||
public $enabled = 'isModEnabled("eventorganization")';
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -42,6 +42,9 @@ class mailing_fraise extends MailingTargets
|
|||
|
||||
public $require_module = array('adherent');
|
||||
|
||||
/**
|
||||
* @var string condition to enable module
|
||||
*/
|
||||
public $enabled = 'isModEnabled("member")';
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018-2018 Andre Schild <a.schild@aarboard.ch>
|
||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2018-2018 Andre Schild <a.schild@aarboard.ch>
|
||||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This file is an example to follow to add your own email selector inside
|
||||
* the Dolibarr email tool.
|
||||
|
|
@ -27,12 +28,25 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
|||
*/
|
||||
class mailing_partnership extends MailingTargets
|
||||
{
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
/**
|
||||
* @var string name of mailing module
|
||||
*/
|
||||
public $name = 'PartnershipThirdpartiesOrMembers';
|
||||
|
||||
/**
|
||||
* @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
*/
|
||||
public $desc = "Thirdparties or members included into a partnership program";
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $require_admin = 0;
|
||||
|
||||
/**
|
||||
* @var string[]
|
||||
*
|
||||
*/
|
||||
public $require_module = array('partnership'); // This module allows to select by categories must be also enabled if category module is not activated
|
||||
|
||||
/**
|
||||
|
|
@ -40,6 +54,9 @@ class mailing_partnership extends MailingTargets
|
|||
*/
|
||||
public $picto = 'partnership';
|
||||
|
||||
/**
|
||||
* @var string condition to enable module
|
||||
*/
|
||||
public $enabled = 'isModEnabled("partnership")';
|
||||
|
||||
|
||||
|
|
@ -50,7 +67,7 @@ class mailing_partnership extends MailingTargets
|
|||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
$langs->load('companies');
|
||||
|
||||
$this->db = $db;
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2005-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -31,11 +32,25 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
|||
*/
|
||||
class mailing_pomme extends MailingTargets
|
||||
{
|
||||
public $name = 'DolibarrUsers'; // Identifiant du module mailing
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
public $desc = 'Dolibarr users with emails'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouv<75>e
|
||||
public $require_module = array(); // Module mailing actif si modules require_module actifs
|
||||
public $require_admin = 1; // Module mailing actif pour user admin ou non
|
||||
/**
|
||||
* @var string name of mailing module
|
||||
*/
|
||||
public $name = 'DolibarrUsers';
|
||||
|
||||
/**
|
||||
* @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
*/
|
||||
public $desc = 'Dolibarr users with emails'; // Libelle utilise si aucune traduction pour MailingModuleDescXXX ou XXX=name trouvée
|
||||
|
||||
/**
|
||||
* @var string[] Module mailing actif si modules require_module actifs
|
||||
*/
|
||||
public $require_module = array();
|
||||
|
||||
/**
|
||||
* @var int Module mailing actif pour user admin ou non
|
||||
*/
|
||||
public $require_admin = 1;
|
||||
|
||||
/**
|
||||
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This file is an example to follow to add your own email selector inside
|
||||
* the Dolibarr email tool.
|
||||
|
|
@ -25,13 +26,29 @@ include_once DOL_DOCUMENT_ROOT.'/core/modules/mailings/modules_mailings.php';
|
|||
*/
|
||||
class mailing_thirdparties extends MailingTargets
|
||||
{
|
||||
/**
|
||||
* @var string name of mailing module
|
||||
*/
|
||||
public $name = 'ThirdPartiesByCategories';
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
|
||||
/**
|
||||
* @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
*/
|
||||
public $desc = "Third parties (by categories)";
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $require_admin = 0;
|
||||
|
||||
public $require_module = array("societe"); // This module allows to select by categories must be also enabled if category module is not activated
|
||||
/**
|
||||
* @var string[] This module allows to select by categories must be also enabled if category module is not activated
|
||||
*/
|
||||
public $require_module = array("societe");
|
||||
|
||||
/**
|
||||
* @var string condition to enable module
|
||||
*/
|
||||
public $enabled = 'isModEnabled("societe")';
|
||||
|
||||
/**
|
||||
|
|
@ -47,7 +64,7 @@ class mailing_thirdparties extends MailingTargets
|
|||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $langs;
|
||||
$langs->load("companies");
|
||||
|
||||
$this->db = $db;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This file is an example to follow to add your own email selector inside
|
||||
* the Dolibarr email tool.
|
||||
|
|
@ -23,13 +24,29 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
|||
*/
|
||||
class mailing_thirdparties_services_expired extends MailingTargets
|
||||
{
|
||||
/**
|
||||
* @var string name of mailing module
|
||||
*/
|
||||
public $name = 'DolibarrContractsLinesExpired';
|
||||
// This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
|
||||
/**
|
||||
* @var string This label is used if no translation is found for key XXX neither MailingModuleDescXXX where XXX=name is found
|
||||
*/
|
||||
public $desc = 'Third parties with expired contract\'s lines';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $require_admin = 0;
|
||||
|
||||
/**
|
||||
* @var string[] This module allows to select by categories must be also enabled if category module is not activated
|
||||
*/
|
||||
public $require_module = array('contrat');
|
||||
|
||||
/**
|
||||
* @var string condition to enable module
|
||||
*/
|
||||
public $enabled = 'isModEnabled("societe")';
|
||||
|
||||
/**
|
||||
|
|
@ -37,6 +54,9 @@ class mailing_thirdparties_services_expired extends MailingTargets
|
|||
*/
|
||||
public $picto = 'company';
|
||||
|
||||
/**
|
||||
* @var array<int,string>
|
||||
*/
|
||||
public $arrayofproducts = array();
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -208,8 +208,8 @@ class doc_generic_task_odt extends ModelePDFTask
|
|||
'task_public' => $task->public,
|
||||
'task_date_start' => dol_print_date($task->date_start, 'day'),
|
||||
'task_date_end' => dol_print_date($task->date_end, 'day'),
|
||||
'task_note_private' => $task->note_private,
|
||||
'task_note_public' => $task->note_public
|
||||
'task_note_private' => (string) $task->note_private,
|
||||
'task_note_public' => (string) $task->note_public
|
||||
);
|
||||
|
||||
// Retrieve extrafields
|
||||
|
|
|
|||
Loading…
Reference in a new issue