From cb2ebb1d569005afa460d71c0ba6fb798111aa50 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 12 Jan 2024 20:51:10 +0100 Subject: [PATCH] Fix phpcs --- .../class/conferenceorboothattendee.class.php | 2 +- htdocs/expensereport/class/expensereport.class.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- htdocs/fourn/class/fournisseur.facture.class.php | 4 ++-- htdocs/hrm/class/evaluationdet.class.php | 2 +- htdocs/hrm/class/job.class.php | 2 +- htdocs/hrm/class/position.class.php | 2 +- htdocs/hrm/class/skill.class.php | 2 +- htdocs/hrm/class/skilldet.class.php | 2 +- htdocs/hrm/class/skillrank.class.php | 4 ++-- htdocs/knowledgemanagement/class/knowledgerecord.class.php | 2 +- htdocs/modulebuilder/template/class/myobject.class.php | 2 +- htdocs/mrp/class/mo.class.php | 2 +- htdocs/partnership/class/partnership.class.php | 2 +- htdocs/product/inventory/class/inventory.class.php | 2 +- htdocs/recruitment/class/recruitmentjobposition.class.php | 2 +- htdocs/ticket/class/cticketcategory.class.php | 2 +- htdocs/webhook/class/target.class.php | 2 +- htdocs/workstation/class/workstation.class.php | 2 +- 19 files changed, 21 insertions(+), 21 deletions(-) diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php index 47d7271f13c..940441cd3da 100644 --- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php +++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php @@ -513,7 +513,7 @@ class ConferenceOrBoothAttendee extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 2f8792e079f..9b59b1121f7 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1138,7 +1138,7 @@ class ExpenseReport extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int Return integer <0 if KO, >0 if OK */ - public function delete(User $user = null, $notrigger = false) + public function delete(User $user = null, $notrigger = 0) { global $conf; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 5ac1591bc86..8b758373624 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1833,7 +1833,7 @@ class CommandeFournisseur extends CommonOrder * @param int $special_code Special code * @return int Return integer <=0 if KO, >0 if OK */ - public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = false, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1, $special_code = 0) + public function addline($desc, $pu_ht, $qty, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $fk_product = 0, $fk_prod_fourn_price = 0, $ref_supplier = '', $remise_percent = 0.0, $price_base_type = 'HT', $pu_ttc = 0.0, $type = 0, $info_bits = 0, $notrigger = 0, $date_start = null, $date_end = null, $array_options = 0, $fk_unit = null, $pu_ht_devise = 0, $origin = '', $origin_id = 0, $rang = -1, $special_code = 0) { global $langs, $mysoc, $conf; diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index 735d2c34bf7..ac0b9e67218 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -2069,7 +2069,7 @@ class FactureFournisseur extends CommonInvoice * @param int $fk_remise_except Id discount used * @return int >0 if OK, <0 if KO */ - public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = '', $price_base_type = 'HT', $type = 0, $rang = -1, $notrigger = false, $array_options = 0, $fk_unit = null, $origin_id = 0, $pu_devise = 0, $ref_supplier = '', $special_code = '', $fk_parent_line = 0, $fk_remise_except = 0) + public function addline($desc, $pu, $txtva, $txlocaltax1, $txlocaltax2, $qty, $fk_product = 0, $remise_percent = 0, $date_start = '', $date_end = '', $ventil = 0, $info_bits = '', $price_base_type = 'HT', $type = 0, $rang = -1, $notrigger = 0, $array_options = 0, $fk_unit = null, $origin_id = 0, $pu_devise = 0, $ref_supplier = '', $special_code = '', $fk_parent_line = 0, $fk_remise_except = 0) { global $langs, $mysoc, $conf; @@ -2332,7 +2332,7 @@ class FactureFournisseur extends CommonInvoice * @param integer $rang line rank * @return int Return integer <0 if KO, >0 if OK */ - public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1 = 0, $txlocaltax2 = 0, $qty = 1, $idproduct = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $remise_percent = 0, $notrigger = false, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_devise = 0, $ref_supplier = '', $rang = 0) + public function updateline($id, $desc, $pu, $vatrate, $txlocaltax1 = 0, $txlocaltax2 = 0, $qty = 1, $idproduct = 0, $price_base_type = 'HT', $info_bits = 0, $type = 0, $remise_percent = 0, $notrigger = 0, $date_start = '', $date_end = '', $array_options = 0, $fk_unit = null, $pu_devise = 0, $ref_supplier = '', $rang = 0) { global $mysoc, $langs; diff --git a/htdocs/hrm/class/evaluationdet.class.php b/htdocs/hrm/class/evaluationdet.class.php index 7c920aa7d46..10148a18b18 100644 --- a/htdocs/hrm/class/evaluationdet.class.php +++ b/htdocs/hrm/class/evaluationdet.class.php @@ -467,7 +467,7 @@ class EvaluationLine extends CommonObjectLine * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/hrm/class/job.class.php b/htdocs/hrm/class/job.class.php index 44e2fc573a3..6be5a2750d5 100644 --- a/htdocs/hrm/class/job.class.php +++ b/htdocs/hrm/class/job.class.php @@ -465,7 +465,7 @@ class Job extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/hrm/class/position.class.php b/htdocs/hrm/class/position.class.php index a23daecc7d1..33fa7751527 100644 --- a/htdocs/hrm/class/position.class.php +++ b/htdocs/hrm/class/position.class.php @@ -475,7 +475,7 @@ class Position extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int Return >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index cbbbb78be3a..f8d33c70b37 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -533,7 +533,7 @@ class Skill extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int Return >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/hrm/class/skilldet.class.php b/htdocs/hrm/class/skilldet.class.php index 6d3b81992cc..1a328e7a10a 100644 --- a/htdocs/hrm/class/skilldet.class.php +++ b/htdocs/hrm/class/skilldet.class.php @@ -456,7 +456,7 @@ class Skilldet extends CommonObjectLine * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int Return >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index 3934dcedcd6..c082ca57c60 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -503,9 +503,9 @@ class SkillRank extends CommonObject * @param User $user User that delete * @param int $idline Id of line to delete * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int >0 if OK, <0 if KO + * @return int Return >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/knowledgemanagement/class/knowledgerecord.class.php b/htdocs/knowledgemanagement/class/knowledgerecord.class.php index d8440e67cee..33bb16ba2a6 100644 --- a/htdocs/knowledgemanagement/class/knowledgerecord.class.php +++ b/htdocs/knowledgemanagement/class/knowledgerecord.class.php @@ -506,7 +506,7 @@ class KnowledgeRecord extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int Return >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index a36d9c27280..e0c27aa2d47 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -571,7 +571,7 @@ class MyObject extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/mrp/class/mo.class.php b/htdocs/mrp/class/mo.class.php index 3c3ceb5fb48..24afa8c5d39 100644 --- a/htdocs/mrp/class/mo.class.php +++ b/htdocs/mrp/class/mo.class.php @@ -882,7 +882,7 @@ class Mo extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { global $langs; $langs->loadLangs(array('stocks', 'mrp')); diff --git a/htdocs/partnership/class/partnership.class.php b/htdocs/partnership/class/partnership.class.php index 4ddb58053b3..eb505a8c1db 100644 --- a/htdocs/partnership/class/partnership.class.php +++ b/htdocs/partnership/class/partnership.class.php @@ -540,7 +540,7 @@ class Partnership extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index bebf57602ba..ebad46bb729 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -552,7 +552,7 @@ class Inventory extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/recruitment/class/recruitmentjobposition.class.php b/htdocs/recruitment/class/recruitmentjobposition.class.php index 1ee53b7a2e9..818039137ac 100644 --- a/htdocs/recruitment/class/recruitmentjobposition.class.php +++ b/htdocs/recruitment/class/recruitmentjobposition.class.php @@ -479,7 +479,7 @@ class RecruitmentJobPosition extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int Return >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/ticket/class/cticketcategory.class.php b/htdocs/ticket/class/cticketcategory.class.php index 1e1e2d8ab44..4f9e436a7da 100644 --- a/htdocs/ticket/class/cticketcategory.class.php +++ b/htdocs/ticket/class/cticketcategory.class.php @@ -472,7 +472,7 @@ class CTicketCategory extends CommonObject * @param int $notrigger false=launch triggers after, true=disable triggers * @return int >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/webhook/class/target.class.php b/htdocs/webhook/class/target.class.php index bf5248313c2..b7ef96034eb 100644 --- a/htdocs/webhook/class/target.class.php +++ b/htdocs/webhook/class/target.class.php @@ -474,7 +474,7 @@ class Target extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus'; diff --git a/htdocs/workstation/class/workstation.class.php b/htdocs/workstation/class/workstation.class.php index b25882a3b34..392d6d18673 100644 --- a/htdocs/workstation/class/workstation.class.php +++ b/htdocs/workstation/class/workstation.class.php @@ -549,7 +549,7 @@ class Workstation extends CommonObject * @param int $notrigger 0=launch triggers after, 1=disable triggers * @return int Return >0 if OK, <0 if KO */ - public function deleteLine(User $user, $idline, $notrigger = false) + public function deleteLine(User $user, $idline, $notrigger = 0) { if ($this->status < 0) { $this->error = 'ErrorDeleteLineNotAllowedByObjectStatus';