Completed
Branch develop (23e2bb)
by
unknown
46:20
created

ModeleStock   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 24
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 1
1
<?php
2
/* Copyright (C) 2018 Laurent Destailleur  <[email protected]>
3
 *
4
 * This program is free software; you can redistribute it and/or modify
5
 * it under the terms of the GNU General Public License as published by
6
 * the Free Software Foundation; either version 3 of the License, or
7
 * (at your option) any later version.
8
 *
9
 * This program is distributed in the hope that it will be useful,
10
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
 * GNU General Public License for more details.
13
 *
14
 * You should have received a copy of the GNU General Public License
15
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
16
 * or see http://www.gnu.org/
17
 */
18
19
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
20
21
/**
22
 *	Parent class for stock models of doc generators
23
 */
24
abstract class ModelePDFStock extends CommonDocGenerator
0 ignored issues
show
Comprehensibility Best Practice introduced by
The type ModelePDFStock has been defined more than once; this definition is ignored, only the first definition in htdocs/core/modules/stock/modules_stock.class.php (L39-62) is considered.

This check looks for classes that have been defined more than once.

If you can, we would recommend to use standard object-oriented programming techniques. For example, to avoid multiple types, it might make sense to create a common interface, and then multiple, different implementations for that interface.

This also has the side-effect of providing you with better IDE auto-completion, static analysis and also better OPCode caching from PHP.

Loading history...
25
{
26
    var $error='';
27
28
    /**
29
     *  Return list of active generation modules
30
     *
31
	 * 	@param	DoliDB		$db					Database handler
32
     *  @param	integer		$maxfilenamelength  Max length of value to show
33
     * 	@return	array							List of templates
34
     */
35
    static function liste_modeles($db,$maxfilenamelength=0)
36
    {
37
        global $conf;
38
39
        $type='stock';
40
        $liste=array();
41
42
        include_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
43
        $liste=getListOfModels($db,$type,$maxfilenamelength);
44
45
        return $liste;
46
    }
47
}
48