diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index da4cb2fbfe7..4f33b72da17 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -932,8 +932,8 @@ class Account extends CommonObject /** * Update BBAN (RIB) account fields * - * @param User $user Object user making update - * @return int <0 if KO, >0 if OK + * @param User|null $user Object user making update + * @return int <0 if KO, >0 if OK */ public function update_bban(User $user = null) { @@ -1110,8 +1110,8 @@ class Account extends CommonObject /** * Delete bank account from database * - * @param User $user User deleting - * @return int <0 if KO, >0 if OK + * @param User|null $user User deleting + * @return int <0 if KO, >0 if OK */ public function delete(User $user = null) { @@ -2158,8 +2158,8 @@ class AccountLine extends CommonObjectLine /** * Delete bank transaction record * - * @param User $user User object that delete - * @return int <0 if KO, >0 if OK + * @param User|null $user User object that delete + * @return int <0 if KO, >0 if OK */ public function delete(User $user = null) { @@ -2231,10 +2231,10 @@ class AccountLine extends CommonObjectLine // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** - * Delete bank line records + * Delete bank line records * - * @param User $user User object that delete - * @return int <0 if KO, >0 if OK + * @param User|null $user User object that delete + * @return int <0 if KO, >0 if OK */ public function delete_urls(User $user = null) { diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index 9ee8bb66a05..7c4ef7600d1 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -170,9 +170,9 @@ class BankCateg // extends CommonObject /** * Update database * - * @param User $user User that modify - * @param int $notrigger 0=launch triggers after, 1=disable triggers - * @return int <0 if KO, >0 if OK + * @param User|null $user User that modify + * @param int $notrigger 0=launch triggers after, 1=disable triggers + * @return int <0 if KO, >0 if OK */ public function update(User $user = null, $notrigger = 0) { diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 4be546c792c..dbb63e20cb8 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -931,11 +931,11 @@ class Paiement extends CommonObject } /** - * Validate payment + * Validate payment * - * @param User $user User making validation - * @return int <0 if KO, >0 if OK - * @deprecated + * @param User|null $user User making validation + * @return int <0 if KO, >0 if OK + * @deprecated */ public function valide(User $user = null) { @@ -943,10 +943,10 @@ class Paiement extends CommonObject } /** - * Validate payment + * Validate payment * - * @param User $user User making validation - * @return int <0 if KO, >0 if OK + * @param User|null $user User making validation + * @return int <0 if KO, >0 if OK */ public function validate(User $user = null) { @@ -964,10 +964,10 @@ class Paiement extends CommonObject } /** - * Reject payment + * Reject payment * - * @param User $user User making reject - * @return int <0 if KO, >0 if OK + * @param User|null $user User making reject + * @return int <0 if KO, >0 if OK */ public function reject(User $user = null) { @@ -985,10 +985,10 @@ class Paiement extends CommonObject } /** - * Information sur l'objet + * Information sur l'objet * - * @param int $id id du paiement dont il faut afficher les infos - * @return void + * @param int $id id du paiement dont il faut afficher les infos + * @return void */ public function info($id) { diff --git a/htdocs/core/lib/categories.lib.php b/htdocs/core/lib/categories.lib.php index 5ee8ac517a8..7f75adedec6 100644 --- a/htdocs/core/lib/categories.lib.php +++ b/htdocs/core/lib/categories.lib.php @@ -25,9 +25,9 @@ /** * Prepare array with list of tabs * - * @param Object $object Object related to tabs - * @param string $type Type of category - * @return array Array of tabs to show + * @param Categorie $object Object related to tabs + * @param string $type Type of category + * @return array Array of tabs to show */ function categories_prepare_head(Categorie $object, $type) { diff --git a/htdocs/core/lib/expensereport.lib.php b/htdocs/core/lib/expensereport.lib.php index ae9ca936c47..fd72aa16135 100644 --- a/htdocs/core/lib/expensereport.lib.php +++ b/htdocs/core/lib/expensereport.lib.php @@ -92,12 +92,11 @@ function expensereport_prepare_head($object) * Returns an array with the tabs for the "Expense report payment" section * It loads tabs from modules looking for the entity payment * - * @param Paiement $object Current payment object - * @return array Tabs for the payment section + * @param PaymentExpenseReport $object Current payment object + * @return array Tabs for the payment section */ function payment_expensereport_prepare_head(PaymentExpenseReport $object) { - global $langs, $conf; $h = 0; diff --git a/htdocs/core/lib/functions2.lib.php b/htdocs/core/lib/functions2.lib.php index 3ed3d03c527..4a8cb27cdef 100644 --- a/htdocs/core/lib/functions2.lib.php +++ b/htdocs/core/lib/functions2.lib.php @@ -113,8 +113,8 @@ function dolGetModulesDirs($subdir = '') /** * Try to guess default paper format according to language into $langs * - * @param Translate $outputlangs Output lang to use to autodetect output format if setup not done - * @return string Default paper format code + * @param Translate|null $outputlangs Output lang to use to autodetect output format if setup not done + * @return string Default paper format code */ function dol_getDefaultFormat(Translate $outputlangs = null) { diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index bd735f7d033..4371f55d0c5 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -78,9 +78,9 @@ function pdf_admin_prepare_head() /** * Return array with format properties of default PDF format * - * @param Translate $outputlangs Output lang to use to autodetect output format if we need 'auto' detection - * @param string $mode 'setup' = Use setup, 'auto' = Force autodetection whatever is setup - * @return array Array('width'=>w,'height'=>h,'unit'=>u); + * @param Translate|null $outputlangs Output lang to use to autodetect output format if we need 'auto' detection + * @param string $mode 'setup' = Use setup, 'auto' = Force autodetection whatever is setup + * @return array Array('width'=>w,'height'=>h,'unit'=>u); */ function pdf_getFormat(Translate $outputlangs = null, $mode = 'setup') { diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index af807516c30..853060f3b2c 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -184,15 +184,13 @@ class doc_generic_project_odt extends ModelePDFProjects /** * Define array with couple substitution key => substitution value * - * @param array $task Task Object + * @param Task $task Task Object * @param Translate $outputlangs Lang object to use for output * @return array Return a substitution array */ public function get_substitutionarray_tasks(Task $task, $outputlangs) { // phpcs:enable - global $conf; - $resarray = array( 'task_ref'=>$task->ref, 'task_fk_project'=>$task->fk_project, diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 5cb0f88e67b..3bd1644c49d 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -1138,9 +1138,9 @@ class ExpenseReport extends CommonObject /** * Delete object in database * - * @param User $user User that delete - * @param bool $notrigger false=launch triggers after, true=disable triggers - * @return int <0 if KO, >0 if OK + * @param User|null $user User that delete + * @param bool $notrigger false=launch triggers after, true=disable triggers + * @return int <0 if KO, >0 if OK */ public function delete(User $user = null, $notrigger = false) { diff --git a/htdocs/societe/class/companybankaccount.class.php b/htdocs/societe/class/companybankaccount.class.php index c56a6db007d..7598e9a0838 100644 --- a/htdocs/societe/class/companybankaccount.class.php +++ b/htdocs/societe/class/companybankaccount.class.php @@ -102,9 +102,9 @@ class CompanyBankAccount extends Account /** * Create bank information record. * - * @param User $user User - * @param int $notrigger 1=Disable triggers - * @return int <0 if KO, > 0 if OK (ID of newly created company bank account information) + * @param User|null $user User + * @param int $notrigger 1=Disable triggers + * @return int <0 if KO, > 0 if OK (ID of newly created company bank account information) */ public function create(User $user = null, $notrigger = 0) { @@ -170,13 +170,13 @@ class CompanyBankAccount extends Account /** * Update bank account * - * @param User $user Object user - * @param int $notrigger 1=Disable triggers - * @return int <=0 if KO, >0 if OK + * @param User|null $user Object user + * @param int $notrigger 1=Disable triggers + * @return int <=0 if KO, >0 if OK */ public function update(User $user = null, $notrigger = 0) { - global $conf, $langs; + global $langs; $error = 0; @@ -321,9 +321,9 @@ class CompanyBankAccount extends Account /** * Delete a rib from database * - * @param User $user User deleting - * @param int $notrigger 1=Disable triggers - * @return int <0 if KO, >0 if OK + * @param User|null $user User deleting + * @param int $notrigger 1=Disable triggers + * @return int <0 if KO, >0 if OK */ public function delete(User $user = null, $notrigger = 0) { diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index acc8694fbd2..a9f9cdea193 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -2040,10 +2040,10 @@ class Societe extends CommonObject /** * Delete a third party from database and all its dependencies (contacts, rib...) * - * @param int $id Id of third party to delete - * @param User $fuser User who ask to delete thirdparty - * @param int $call_trigger 0=No, 1=yes - * @return int <0 if KO, 0 if nothing done, >0 if OK + * @param int $id Id of third party to delete + * @param User|null $fuser User who ask to delete thirdparty + * @param int $call_trigger 0=No, 1=yes + * @return int <0 if KO, 0 if nothing done, >0 if OK */ public function delete($id, User $fuser = null, $call_trigger = 1) { diff --git a/htdocs/user/class/userbankaccount.class.php b/htdocs/user/class/userbankaccount.class.php index 857f60d55e5..9aec7100acf 100644 --- a/htdocs/user/class/userbankaccount.class.php +++ b/htdocs/user/class/userbankaccount.class.php @@ -85,9 +85,9 @@ class UserBankAccount extends Account /** * Create bank information record * - * @param User $user User - * @param int $notrigger 1=Disable triggers - * @return int <0 if KO, >= 0 if OK + * @param User|null $user User + * @param int $notrigger 1=Disable triggers + * @return int <0 if KO, >= 0 if OK */ public function create(User $user = null, $notrigger = 0) { @@ -111,9 +111,9 @@ class UserBankAccount extends Account /** * Update bank account * - * @param User $user Object user - * @param int $notrigger 1=Disable triggers - * @return int <=0 if KO, >0 if OK + * @param User|null $user Object user + * @param int $notrigger 1=Disable triggers + * @return int <=0 if KO, >0 if OK */ public function update(User $user = null, $notrigger = 0) { @@ -227,8 +227,8 @@ class UserBankAccount extends Account /** * Delete user bank account from database * - * @param User $user User deleting - * @return int <0 if KO, >0 if OK + * @param User|null $user User deleting + * @return int <0 if KO, >0 if OK */ public function delete(User $user = null) { diff --git a/qodana.yaml b/qodana.yaml index 6f143b03635..9012d2d8282 100644 --- a/qodana.yaml +++ b/qodana.yaml @@ -114,5 +114,5 @@ exclude: - name: PhpDocMissingThrowsInspection - name: UnnecessaryLabelJS - name: JSCheckFunctionSignatures - + - name: PhpReturnDocTypeMismatchInspection \ No newline at end of file