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

ModelePDFSuppliersPayments   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A liste_modeles() 0 10 1
1
<?php
2
3
/* Copyright (C) 2015       Juanjo Menent               <[email protected]>
4
 * Copyright (C) 2024       Rafael San José             <[email protected]>
5
 *
6
 * This program is free software; you can redistribute it and/or modify
7
 * it under the terms of the GNU General Public License as published by
8
 * the Free Software Foundation; either version 3 of the License, or
9
 * (at your option) any later version.
10
 *
11
 * This program is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18
 * or see https://www.gnu.org/
19
 */
20
21
namespace Dolibarr\Code\SupplierPayment\Classes;
22
23
use Dolibarr\Code\Core\Classes\CommonDocGenerator;
24
25
/**
26
 *  Parent class for supplier invoices models
27
 */
28
abstract class ModelePDFSuppliersPayments extends CommonDocGenerator
29
{
30
    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
31
    /**
32
     *  Return list of active generation models
33
     *
34
     * @param DoliDB $db Database handler
0 ignored issues
show
Bug introduced by
The type Dolibarr\Code\SupplierPayment\Classes\DoliDB was not found. Did you mean DoliDB? If so, make sure to prefix the type with \.
Loading history...
35
     * @param integer $maxfilenamelength Max length of value to show
36
     * @return array                       List of numbers
37
     */
38
    public static function liste_modeles($db, $maxfilenamelength = 0)
39
    {
40
        // phpcs:enable
41
        $type = 'supplier_payment';
42
        $list = array();
43
44
        include_once DOL_DOCUMENT_ROOT . '/core/lib/functions2.lib.php';
45
        $list = getListOfModels($db, $type, $maxfilenamelength);
46
47
        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...
48
    }
49
}
50