| 1 | <?php |
||
| 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 |
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.