Passed
Push — GENERAL_BUG_REVIEW_240911 ( 776d89...c757bd )
by Rafael
50:33
created

ModelePDFMember   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 6
dl 0
loc 19
rs 10
c 1
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A liste_modeles() 0 9 1
1
<?php
2
3
/* Copyright (C) 2003-2005  Rodolphe Quiedeville        <[email protected]>
4
 * Copyright (C) 2004-2010  Laurent Destailleur         <[email protected]>
5
 * Copyright (C) 2004       Eric Seigne                 <[email protected]>
6
 * Copyright (C) 2005-2012  Regis Houssin               <[email protected]>
7
 * Copyright (C) 2024		Frédéric France			    <[email protected]>
8
 * Copyright (C) 2024       Rafael San José             <[email protected]>
9
 *
10
 * This program is free software; you can redistribute it and/or modify
11
 * it under the terms of the GNU General Public License as published by
12
 * the Free Software Foundation; either version 3 of the License, or
13
 * (at your option) any later version.
14
 *
15
 * This program is distributed in the hope that it will be useful,
16
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18
 * GNU General Public License for more details.
19
 *
20
 * You should have received a copy of the GNU General Public License
21
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22
 * or see https://www.gnu.org/
23
 */
24
25
namespace Dolibarr\Code\Members\Classes;
26
27
use Dolibarr\Code\Core\Classes\CommonDocGenerator;
28
use DoliDB;
29
30
/**
31
 *  \file       htdocs/core/modules/member/modules_member.class.php
32
 *  \ingroup    members
33
 *  \brief      File with parent class for generating members to PDF
34
 */
35
36
/**
37
 *  Parent class to manage intervention document templates
38
 */
39
abstract class ModelePDFMember extends CommonDocGenerator
40
{
41
    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
42
    /**
43
     *  Return list of active generation modules
44
     *
45
     * @param DoliDB $db Database handler
46
     * @param integer $maxfilenamelength Max length of value to show
47
     * @return array                       List of templates
48
     */
49
    public static function liste_modeles($db, $maxfilenamelength = 0)
50
    {
51
        // phpcs:enable
52
        $type = 'member';
53
        $list = array();
54
55
        include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
56
        $list = getListOfModels($db, $type, $maxfilenamelength);
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