Passed
Push — GENERAL_BUG_REVIEW_240911 ( 3362b2...8cbbee )
by Rafael
49:13
created

ModeleDon   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 20
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
3
/* Copyright (C) 2003-2005  Rodolphe Quiedeville        <[email protected]>
4
 * Copyright (C) 2004-2008  Laurent Destailleur         <[email protected]>
5
 * Copyright (C) 2004       Eric Seigne                 <[email protected]>
6
 * Copyright (C) 2005       Regis Houssin               <[email protected]>
7
 * Copyright (C) 2024       Rafael San José             <[email protected]>
8
 *
9
 * This program is free software; you can redistribute it and/or modify
10
 * it under the terms of the GNU General Public License as published by
11
 * the Free Software Foundation; either version 3 of the License, or
12
 * (at your option) any later version.
13
 *
14
 * This program is distributed in the hope that it will be useful,
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 * GNU General Public License for more details.
18
 *
19
 * You should have received a copy of the GNU General Public License
20
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
21
 * or see https://www.gnu.org/
22
 */
23
24
namespace Dolibarr\Code\Don\Classes;
25
26
use Dolibarr\Code\Core\Classes\CommonDocGenerator;
27
use DoliDB;
28
29
/**
30
 *      \file       htdocs/core/modules/dons/modules_don.php
31
 *      \ingroup    donations
32
 *      \brief      File of class to manage donation document generation
33
 */
34
35
/**
36
 *  Parent class of subscription templates
37
 */
38
abstract class ModeleDon extends CommonDocGenerator
39
{
40
    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
41
    /**
42
     *  Return list of active generation modules
43
     *
44
     * @param DoliDB $db Database handler
45
     * @param integer $maxfilenamelength Max length of value to show
46
     * @return array                       List of templates
47
     */
48
    public static function liste_modeles($db, $maxfilenamelength = 0)
49
    {
50
        // phpcs:enable
51
        $type = 'donation';
52
        $list = array();
53
54
        include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
55
        $list = getListOfModels($db, $type, $maxfilenamelength);
56
57
        return $list;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $list also could return the type integer which is incompatible with the documented return type array.
Loading history...
58
    }
59
}
60