From 55bef402c4d50915ada0aeb1d9064f3ce4641bdc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 21 Feb 2020 17:33:45 +0100 Subject: [PATCH] Fix remove a lot of warnings on Eclipse --- dev/setup/codesniffer/ruleset.dtd | 5 +++++ htdocs/api/admin/explorer.php | 2 ++ htdocs/core/class/doleditor.class.php | 4 ++-- htdocs/core/class/menubase.class.php | 2 +- .../contract/doc/doc_generic_contract_odt.modules.php | 2 +- htdocs/core/modules/project/task/mod_task_simple.php | 2 +- htdocs/core/modules/project/task/mod_task_universal.php | 2 +- .../modules/stock/doc/doc_generic_stock_odt.modules.php | 7 ++++--- htdocs/core/modules/stock/doc/pdf_standard.modules.php | 2 +- htdocs/fourn/class/api_supplier_orders.class.php | 4 ++-- 10 files changed, 20 insertions(+), 12 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.dtd b/dev/setup/codesniffer/ruleset.dtd index c9922f95b19..24aa32970ea 100644 --- a/dev/setup/codesniffer/ruleset.dtd +++ b/dev/setup/codesniffer/ruleset.dtd @@ -2,6 +2,9 @@ + + + @@ -11,3 +14,5 @@ + + diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php index ac267d29bc3..22263b8b9ba 100644 --- a/htdocs/api/admin/explorer.php +++ b/htdocs/api/admin/explorer.php @@ -25,6 +25,8 @@ * \file htdocs/api/admin/explorer.php */ +use Luracast\Restler\Routes; + require_once '../../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/api/class/api.class.php'; diff --git a/htdocs/core/class/doleditor.class.php b/htdocs/core/class/doleditor.class.php index 06b6ec2d949..a38c25f7614 100644 --- a/htdocs/core/class/doleditor.class.php +++ b/htdocs/core/class/doleditor.class.php @@ -90,7 +90,7 @@ class DolEditor { $content = dol_htmlentitiesbr($content); // If content is not HTML, we convert to HTML. } - if ($this->tool == 'fckeditor') + /*if ($this->tool == 'fckeditor') { require_once DOL_DOCUMENT_ROOT.'/includes/fckeditor/fckeditor.php'; @@ -121,7 +121,7 @@ class DolEditor $this->editor->Config['CustomConfigurationsPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/fckconfig.js'; $this->editor->Config['SkinPath'] = DOL_URL_ROOT.'/theme/'.$conf->theme.'/fckeditor/'; } - } + }*/ // Define some properties if (in_array($this->tool, array('textarea', 'ckeditor', 'ace'))) diff --git a/htdocs/core/class/menubase.class.php b/htdocs/core/class/menubase.class.php index 06e2e99397f..72ff932bfa6 100644 --- a/htdocs/core/class/menubase.class.php +++ b/htdocs/core/class/menubase.class.php @@ -102,7 +102,7 @@ class Menubase /** * @var string Key for menu translation * @deprecated - * @see title + * @see $title */ public $titre; 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 4594a9d63cd..190abd86126 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 @@ -185,7 +185,7 @@ class doc_generic_contract_odt extends ModelePDFContract /** * Function to build a document on disk using the generic odt module. * - * @param Contract $object Object source to build document + * @param Contrat $object Object source to build document * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details diff --git a/htdocs/core/modules/project/task/mod_task_simple.php b/htdocs/core/modules/project/task/mod_task_simple.php index 65c7deb8edf..3f9debf9941 100644 --- a/htdocs/core/modules/project/task/mod_task_simple.php +++ b/htdocs/core/modules/project/task/mod_task_simple.php @@ -47,7 +47,7 @@ class mod_task_simple extends ModeleNumRefTask /** * @var string * @deprecated - * @see name + * @see $name */ public $nom='Simple'; diff --git a/htdocs/core/modules/project/task/mod_task_universal.php b/htdocs/core/modules/project/task/mod_task_universal.php index 1eecf94734b..b1c4f576a74 100644 --- a/htdocs/core/modules/project/task/mod_task_universal.php +++ b/htdocs/core/modules/project/task/mod_task_universal.php @@ -44,7 +44,7 @@ class mod_task_universal extends ModeleNumRefTask /** * @var string * @deprecated - * @see name + * @see $name */ public $nom = 'Universal'; diff --git a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php index 23609ad4384..d5ccf5dbd89 100644 --- a/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php +++ b/htdocs/core/modules/stock/doc/doc_generic_stock_odt.modules.php @@ -209,7 +209,7 @@ class doc_generic_stock_odt extends ModelePDFStock /** * Function to build a document on disk using the generic odt module. * - * @param Stock $object Object source to build document + * @param Entrepot $object Object source to build document * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details @@ -250,7 +250,7 @@ class doc_generic_stock_odt extends ModelePDFStock if (!is_object($object)) { $id = $object; - $object = new Stock($this->db); + $object = new Entrepot($this->db); $result = $object->fetch($id); if ($result < 0) { @@ -258,7 +258,8 @@ class doc_generic_stock_odt extends ModelePDFStock return -1; } } - $stockFournisseur = new StockFournisseur($this->db); + + $stockFournisseur = new ProductFournisseur($this->db); $supplierprices = $stockFournisseur->list_stock_fournisseur_price($object->id); $object->supplierprices = $supplierprices; diff --git a/htdocs/core/modules/stock/doc/pdf_standard.modules.php b/htdocs/core/modules/stock/doc/pdf_standard.modules.php index b2898c2fbac..17071641817 100644 --- a/htdocs/core/modules/stock/doc/pdf_standard.modules.php +++ b/htdocs/core/modules/stock/doc/pdf_standard.modules.php @@ -181,7 +181,7 @@ class pdf_standard extends ModelePDFStock /** * Function to build a document on disk using the generic odt module. * - * @param Stock $object Object source to build document + * @param Entrepot $object Object source to build document * @param Translate $outputlangs Lang output object * @param string $srctemplatepath Full path of source filename for generator using a template file * @param int $hidedetails Do not show line details diff --git a/htdocs/fourn/class/api_supplier_orders.class.php b/htdocs/fourn/class/api_supplier_orders.class.php index 37ac4c55e9d..cb2e27b1a97 100644 --- a/htdocs/fourn/class/api_supplier_orders.class.php +++ b/htdocs/fourn/class/api_supplier_orders.class.php @@ -252,8 +252,8 @@ class SupplierOrders extends DolibarrApi /** * Delete supplier order * - * @param int $id Supplier order ID - * @return type + * @param int $id Supplier order ID + * @return array Array of result */ public function delete($id) {