Passed
Push — GENERAL_BUG_REVIEW_240911 ( c757bd...0ad96d )
by Rafael
45:56
created

ModelePDFUserGroup   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 19
rs 10
c 0
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       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\UserGroup\Classes;
25
26
use Dolibarr\Code\Core\Classes\CommonDocGenerator;
27
28
/**
29
 *  \file       htdocs/core/modules/contract/modules_contract.php
30
 *  \ingroup    contract
31
 *  \brief      File with parent class for generating contracts to PDF and File of class to manage contract numbering
32
 */
33
34
/**
35
 *  Parent class to manage intervention document templates
36
 */
37
abstract class ModelePDFUserGroup extends CommonDocGenerator
38
{
39
    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
40
    /**
41
     *  Return list of active generation modules
42
     *
43
     * @param DoliDB $db Database handler
0 ignored issues
show
Bug introduced by
The type Dolibarr\Code\UserGroup\Classes\DoliDB was not found. Did you mean DoliDB? If so, make sure to prefix the type with \.
Loading history...
44
     * @param integer $maxfilenamelength Max length of value to show
45
     * @return array                       List of templates
46
     */
47
    public static function liste_modeles($db, $maxfilenamelength = 0)
48
    {
49
        // phpcs:enable
50
        $type = 'group';
51
        $list = array();
52
53
        include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
54
        $list = getListOfModels($db, $type, $maxfilenamelength);
55
        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...
56
    }
57
}
58