From 46d7385c54daff2d90a74811518634d58d2b1003 Mon Sep 17 00:00:00 2001 From: Philippe GRAND Date: Thu, 20 Sep 2018 09:13:49 +0200 Subject: [PATCH] Standardize and update code --- .../commande/doc/doc_generic_order_odt.modules.php | 7 ++++++- .../contract/doc/doc_generic_contract_odt.modules.php | 8 ++++++-- .../expedition/doc/doc_generic_shipment_odt.modules.php | 9 +++++++-- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 7c3ca5bd2e6..53b3731d533 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -3,6 +3,7 @@ * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2018 Philippe Grand * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -44,7 +45,11 @@ class doc_generic_order_odt extends ModelePDFCommandes */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document diff --git a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php index eca3f13d57f..5ba56d8b73d 100644 --- a/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php +++ b/htdocs/core/modules/contract/doc/doc_generic_contract_odt.modules.php @@ -43,7 +43,11 @@ class doc_generic_contract_odt extends ModelePDFContract */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document @@ -59,7 +63,7 @@ class doc_generic_contract_odt extends ModelePDFContract */ function __construct($db) { - global $conf,$langs,$mysoc; + global $conf, $langs, $mysoc; // Load translation files required by the page $langs->loadLangs(array("main","companies")); diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 729663bf625..53738f23df2 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -2,7 +2,8 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García - * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2016 Charlie Benke + * Copyright (C) 2018 Philippe Grand * * This program is free software; you can redistribute it and/or modify @@ -45,7 +46,11 @@ class doc_generic_shipment_odt extends ModelePdfExpedition */ public $emetteur; - public $phpmin = array(5,4,0); // Minimum version of PHP required by module + /** + * @var array() Minimum version of PHP required by module. + * e.g.: PHP ≥ 5.4 = array(5, 4) + */ + public $phpmin = array(5, 4); /** * Dolibarr version of the loaded document