Fix warnings

This commit is contained in:
Laurent Destailleur 2023-05-02 04:11:05 +02:00
parent 10a58e5513
commit 98067fbfb4
13 changed files with 62 additions and 65 deletions

View File

@ -932,7 +932,7 @@ class Account extends CommonObject
/** /**
* Update BBAN (RIB) account fields * Update BBAN (RIB) account fields
* *
* @param User $user Object user making update * @param User|null $user Object user making update
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function update_bban(User $user = null) public function update_bban(User $user = null)
@ -1110,7 +1110,7 @@ class Account extends CommonObject
/** /**
* Delete bank account from database * Delete bank account from database
* *
* @param User $user User deleting * @param User|null $user User deleting
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function delete(User $user = null) public function delete(User $user = null)
@ -2158,7 +2158,7 @@ class AccountLine extends CommonObjectLine
/** /**
* Delete bank transaction record * Delete bank transaction record
* *
* @param User $user User object that delete * @param User|null $user User object that delete
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function delete(User $user = null) public function delete(User $user = null)
@ -2233,7 +2233,7 @@ class AccountLine extends CommonObjectLine
/** /**
* Delete bank line records * Delete bank line records
* *
* @param User $user User object that delete * @param User|null $user User object that delete
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function delete_urls(User $user = null) public function delete_urls(User $user = null)

View File

@ -170,7 +170,7 @@ class BankCateg // extends CommonObject
/** /**
* Update database * Update database
* *
* @param User $user User that modify * @param User|null $user User that modify
* @param int $notrigger 0=launch triggers after, 1=disable triggers * @param int $notrigger 0=launch triggers after, 1=disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */

View File

@ -933,7 +933,7 @@ class Paiement extends CommonObject
/** /**
* Validate payment * Validate payment
* *
* @param User $user User making validation * @param User|null $user User making validation
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
* @deprecated * @deprecated
*/ */
@ -945,7 +945,7 @@ class Paiement extends CommonObject
/** /**
* Validate payment * Validate payment
* *
* @param User $user User making validation * @param User|null $user User making validation
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function validate(User $user = null) public function validate(User $user = null)
@ -966,7 +966,7 @@ class Paiement extends CommonObject
/** /**
* Reject payment * Reject payment
* *
* @param User $user User making reject * @param User|null $user User making reject
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function reject(User $user = null) public function reject(User $user = null)

View File

@ -25,7 +25,7 @@
/** /**
* Prepare array with list of tabs * Prepare array with list of tabs
* *
* @param Object $object Object related to tabs * @param Categorie $object Object related to tabs
* @param string $type Type of category * @param string $type Type of category
* @return array Array of tabs to show * @return array Array of tabs to show
*/ */

View File

@ -92,12 +92,11 @@ function expensereport_prepare_head($object)
* Returns an array with the tabs for the "Expense report payment" section * Returns an array with the tabs for the "Expense report payment" section
* It loads tabs from modules looking for the entity payment * It loads tabs from modules looking for the entity payment
* *
* @param Paiement $object Current payment object * @param PaymentExpenseReport $object Current payment object
* @return array Tabs for the payment section * @return array Tabs for the payment section
*/ */
function payment_expensereport_prepare_head(PaymentExpenseReport $object) function payment_expensereport_prepare_head(PaymentExpenseReport $object)
{ {
global $langs, $conf; global $langs, $conf;
$h = 0; $h = 0;

View File

@ -113,7 +113,7 @@ function dolGetModulesDirs($subdir = '')
/** /**
* Try to guess default paper format according to language into $langs * 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 * @param Translate|null $outputlangs Output lang to use to autodetect output format if setup not done
* @return string Default paper format code * @return string Default paper format code
*/ */
function dol_getDefaultFormat(Translate $outputlangs = null) function dol_getDefaultFormat(Translate $outputlangs = null)

View File

@ -78,7 +78,7 @@ function pdf_admin_prepare_head()
/** /**
* Return array with format properties of default PDF format * 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 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 * @param string $mode 'setup' = Use setup, 'auto' = Force autodetection whatever is setup
* @return array Array('width'=>w,'height'=>h,'unit'=>u); * @return array Array('width'=>w,'height'=>h,'unit'=>u);
*/ */

View File

@ -184,15 +184,13 @@ class doc_generic_project_odt extends ModelePDFProjects
/** /**
* Define array with couple substitution key => substitution value * 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 * @param Translate $outputlangs Lang object to use for output
* @return array Return a substitution array * @return array Return a substitution array
*/ */
public function get_substitutionarray_tasks(Task $task, $outputlangs) public function get_substitutionarray_tasks(Task $task, $outputlangs)
{ {
// phpcs:enable // phpcs:enable
global $conf;
$resarray = array( $resarray = array(
'task_ref'=>$task->ref, 'task_ref'=>$task->ref,
'task_fk_project'=>$task->fk_project, 'task_fk_project'=>$task->fk_project,

View File

@ -1138,7 +1138,7 @@ class ExpenseReport extends CommonObject
/** /**
* Delete object in database * Delete object in database
* *
* @param User $user User that delete * @param User|null $user User that delete
* @param bool $notrigger false=launch triggers after, true=disable triggers * @param bool $notrigger false=launch triggers after, true=disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */

View File

@ -102,7 +102,7 @@ class CompanyBankAccount extends Account
/** /**
* Create bank information record. * Create bank information record.
* *
* @param User $user User * @param User|null $user User
* @param int $notrigger 1=Disable triggers * @param int $notrigger 1=Disable triggers
* @return int <0 if KO, > 0 if OK (ID of newly created company bank account information) * @return int <0 if KO, > 0 if OK (ID of newly created company bank account information)
*/ */
@ -170,13 +170,13 @@ class CompanyBankAccount extends Account
/** /**
* Update bank account * Update bank account
* *
* @param User $user Object user * @param User|null $user Object user
* @param int $notrigger 1=Disable triggers * @param int $notrigger 1=Disable triggers
* @return int <=0 if KO, >0 if OK * @return int <=0 if KO, >0 if OK
*/ */
public function update(User $user = null, $notrigger = 0) public function update(User $user = null, $notrigger = 0)
{ {
global $conf, $langs; global $langs;
$error = 0; $error = 0;
@ -321,7 +321,7 @@ class CompanyBankAccount extends Account
/** /**
* Delete a rib from database * Delete a rib from database
* *
* @param User $user User deleting * @param User|null $user User deleting
* @param int $notrigger 1=Disable triggers * @param int $notrigger 1=Disable triggers
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */

View File

@ -2041,7 +2041,7 @@ class Societe extends CommonObject
* Delete a third party from database and all its dependencies (contacts, rib...) * Delete a third party from database and all its dependencies (contacts, rib...)
* *
* @param int $id Id of third party to delete * @param int $id Id of third party to delete
* @param User $fuser User who ask to delete thirdparty * @param User|null $fuser User who ask to delete thirdparty
* @param int $call_trigger 0=No, 1=yes * @param int $call_trigger 0=No, 1=yes
* @return int <0 if KO, 0 if nothing done, >0 if OK * @return int <0 if KO, 0 if nothing done, >0 if OK
*/ */

View File

@ -85,7 +85,7 @@ class UserBankAccount extends Account
/** /**
* Create bank information record * Create bank information record
* *
* @param User $user User * @param User|null $user User
* @param int $notrigger 1=Disable triggers * @param int $notrigger 1=Disable triggers
* @return int <0 if KO, >= 0 if OK * @return int <0 if KO, >= 0 if OK
*/ */
@ -111,7 +111,7 @@ class UserBankAccount extends Account
/** /**
* Update bank account * Update bank account
* *
* @param User $user Object user * @param User|null $user Object user
* @param int $notrigger 1=Disable triggers * @param int $notrigger 1=Disable triggers
* @return int <=0 if KO, >0 if OK * @return int <=0 if KO, >0 if OK
*/ */
@ -227,7 +227,7 @@ class UserBankAccount extends Account
/** /**
* Delete user bank account from database * Delete user bank account from database
* *
* @param User $user User deleting * @param User|null $user User deleting
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
public function delete(User $user = null) public function delete(User $user = null)

View File

@ -114,5 +114,5 @@ exclude:
- name: PhpDocMissingThrowsInspection - name: PhpDocMissingThrowsInspection
- name: UnnecessaryLabelJS - name: UnnecessaryLabelJS
- name: JSCheckFunctionSignatures - name: JSCheckFunctionSignatures
- name: PhpReturnDocTypeMismatchInspection