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

ModelePDFTask   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) 2010       Regis Houssin               <[email protected]>
4
 * Copyright (C) 2010       Florian Henry               <florian.henry<àopen-concept.pro>
5
 * Copyright (C) 2014       Marcos García               <[email protected]>
6
 * Copyright (C) 2024       Rafael San José             <[email protected]>
7
 *
8
 * This program is free software; you can redistribute it and/or modify
9
 * it under the terms of the GNU General Public License as published by
10
 * the Free Software Foundation; either version 3 of the License, or
11
 * (at your option) any later version.
12
 *
13
 * This program is distributed in the hope that it will be useful,
14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16
 * GNU General Public License for more details.
17
 *
18
 * You should have received a copy of the GNU General Public License
19
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
 * or see https://www.gnu.org/
21
 */
22
23
namespace Dolibarr\Code\Projet\Classes;
24
25
use Dolibarr\Code\Core\Classes\CommonDocGenerator;
26
use DoliDB;
27
28
/**
29
 *      \file       htdocs/core/modules/project/task/modules_task.php
30
 *      \ingroup    project
31
 *      \brief      File that contain parent class for task models
32
 *                  and parent class for task numbering models
33
 */
34
35
/**
36
 *  Parent class for task models
37
 */
38
abstract class ModelePDFTask 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 = 'project_task';
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