From cd8ebd9500d9b4064193b04eacad96e6fc0601f8 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 20 Sep 2020 16:57:53 +0200 Subject: [PATCH] Fix warnings --- .../core/class/commonstickergenerator.class.php | 10 +++++----- .../filemanagerdol/connectors/php/basexml.php | 4 ++-- .../fourn/class/api_supplier_invoices.class.php | 15 +++++++-------- .../template/class/api_mymodule.class.php | 3 ++- .../doc/pdf_standard_myobject.modules.php | 2 +- ...df_standard_recruitmentjobposition.modules.php | 2 +- htdocs/webservices/server_productorservice.php | 8 ++------ 7 files changed, 20 insertions(+), 24 deletions(-) diff --git a/htdocs/core/class/commonstickergenerator.class.php b/htdocs/core/class/commonstickergenerator.class.php index 6c832c4788d..c3d6e7de299 100644 --- a/htdocs/core/class/commonstickergenerator.class.php +++ b/htdocs/core/class/commonstickergenerator.class.php @@ -127,7 +127,7 @@ abstract class CommonStickerGenerator /** * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0) * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param Translate $outputlangs Output langs * @param array $param Associative array containing label content and optional parameters * @return void @@ -139,7 +139,7 @@ abstract class CommonStickerGenerator * Methode qui permet de modifier la taille des caracteres * Cela modiera aussi l'espace entre chaque ligne * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param int $pt point * @return void */ @@ -158,7 +158,7 @@ abstract class CommonStickerGenerator /** * protected Print dot line * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param int $x1 X1 * @param int $y1 Y1 * @param int $x2 X2 @@ -201,7 +201,7 @@ abstract class CommonStickerGenerator /** * protected Function realisant une croix aux 4 coins des cartes * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param int $x1 X1 * @param int $y1 Y1 * @param int $x2 X2 @@ -280,7 +280,7 @@ abstract class CommonStickerGenerator /** * protected Set format * - * @param PDF $pdf PDF reference + * @param TCPDF $pdf PDF reference * @param string $format Format * @return void */ diff --git a/htdocs/core/filemanagerdol/connectors/php/basexml.php b/htdocs/core/filemanagerdol/connectors/php/basexml.php index 80973006886..648ab675cfa 100644 --- a/htdocs/core/filemanagerdol/connectors/php/basexml.php +++ b/htdocs/core/filemanagerdol/connectors/php/basexml.php @@ -84,8 +84,8 @@ function CreateXmlFooter() /** * SendError * - * @param integer $number Number - * @param unknown_type $text Text + * @param integer $number Number + * @param string $text Text * @return void */ function SendError($number, $text) diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index f57c83125f6..8c3ca0108e3 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -579,10 +579,9 @@ class SupplierInvoices extends DolibarrApi * * @return object * - * @throws 200 - * @throws 304 - * @throws 401 - * @throws 404 + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found + * @throws RestException 304 Error */ public function putLine($id, $lineid, $request_data = null) { @@ -640,10 +639,10 @@ class SupplierInvoices extends DolibarrApi * * @return array * - * @throws 400 - * @throws 401 - * @throws 404 - * @throws 405 + * @throws RestException 400 Bad parameters + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found + * @throws RestException 405 Error */ public function deleteLine($id, $lineid) { diff --git a/htdocs/modulebuilder/template/class/api_mymodule.class.php b/htdocs/modulebuilder/template/class/api_mymodule.class.php index 571d9a2784d..32113b71ef0 100644 --- a/htdocs/modulebuilder/template/class/api_mymodule.class.php +++ b/htdocs/modulebuilder/template/class/api_mymodule.class.php @@ -64,7 +64,8 @@ class MyModuleApi extends DolibarrApi * * @url GET myobjects/{id} * - * @throws RestException + * @throws RestException 401 Not allowed + * @throws RestException 404 Not found */ public function get($id) { diff --git a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php index 0dbd92aa379..f8fc8466349 100644 --- a/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php +++ b/htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php @@ -1139,7 +1139,7 @@ class pdf_standard_myobject extends ModelePDFMyObject /** * Show footer of page. Need this->emetteur object * - * @param PDF $pdf PDF + * @param TCPDF $pdf PDF * @param Object $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text diff --git a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php index 42b536c4bd6..ee0f63f6c4f 100644 --- a/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php +++ b/htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php @@ -1051,7 +1051,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio /** * Show footer of page. Need this->emetteur object * - * @param PDF $pdf PDF + * @param TCPDF $pdf PDF * @param Object $object Object to show * @param Translate $outputlangs Object lang for output * @param int $hidefreetext 1=Hide free text diff --git a/htdocs/webservices/server_productorservice.php b/htdocs/webservices/server_productorservice.php index f74a945d53b..bf29795f0de 100644 --- a/htdocs/webservices/server_productorservice.php +++ b/htdocs/webservices/server_productorservice.php @@ -503,7 +503,7 @@ function createProductOrService($authentication, $product) if ($product['barcode'] && !$product['barcode_type']) { - $errror++; $errorcode = 'KO'; $errorlabel = "You must set a barcode type when setting a barcode."; + $error++; $errorcode = 'KO'; $errorlabel = "You must set a barcode type when setting a barcode."; } @@ -675,7 +675,7 @@ function updateProductOrService($authentication, $product) if ($product['barcode'] && !$product['barcode_type']) { - $errror++; $errorcode = 'KO'; $errorlabel = "You must set a barcode type when setting a barcode."; + $error++; $errorcode = 'KO'; $errorlabel = "You must set a barcode type when setting a barcode."; } if (!$error) @@ -841,8 +841,6 @@ function deleteProductOrService($authentication, $listofidstring) { global $db, $conf, $langs; - $now = dol_now(); - dol_syslog("Function: deleteProductOrService login=".$authentication['login']); if ($authentication['entity']) $conf->entity = $authentication['entity']; @@ -936,8 +934,6 @@ function getListOfProductsOrServices($authentication, $filterproduct) { global $db, $conf, $langs; - $now = dol_now(); - dol_syslog("Function: getListOfProductsOrServices login=".$authentication['login']); if ($authentication['entity']) $conf->entity = $authentication['entity'];