qodana fix 4: missing returns (#25334)
* qodana fix 4: missing returns * Delete settings.json * correcting the return info function * unreachable code fix * return fix
This commit is contained in:
parent
2bc6cd20dd
commit
b920dfdbda
16 changed files with 19 additions and 6 deletions
|
|
@ -94,6 +94,7 @@ class AssetAccountancyCodes extends CommonObject
|
|||
$this->accountancy_codes[$mode_key][$field_key] = $accountancy_code;
|
||||
}
|
||||
}
|
||||
return $this->accountancy_codes;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1214,6 +1214,7 @@ class FactureRec extends CommonInvoice
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ class LignePrelevement
|
|||
*
|
||||
* @param int $status Id status
|
||||
* @param int $mode 0=Label, 1=Picto + label, 2=Picto, 3=Label + Picto
|
||||
* @return string Label
|
||||
* @return null|string Label
|
||||
*/
|
||||
public function LibStatut($status, $mode = 0)
|
||||
{
|
||||
|
|
@ -160,7 +160,6 @@ class LignePrelevement
|
|||
return $langs->trans($this->statuts[$status]).' '.img_picto($langs->transnoentitiesnoconv($this->statuts[$status]), 'statut8', 'class="valignmiddle"');
|
||||
}
|
||||
}
|
||||
|
||||
//return dolGetStatus($this->labelStatus[$status], $this->labelStatusShort[$status], '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -501,6 +501,7 @@ class Cchargesociales
|
|||
return $langs->trans('Disabled').' '.img_picto($langs->trans('Disabled'), 'statut5');
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -730,8 +730,10 @@ class ChargeSociales extends CommonObject
|
|||
}
|
||||
|
||||
$this->db->free($result);
|
||||
return 1;
|
||||
} else {
|
||||
dol_print_error($this->db);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ function dol_convertToWord($num, $langs, $currency = '', $centimes = false)
|
|||
* @param float $numero Number to convert
|
||||
* @param Translate $langs Language
|
||||
* @param string $numorcurrency 'number' or 'amount'
|
||||
* @return string Text of the number or -1 in case TOO LONG (more than 1000000000000.99)
|
||||
* @return string|int Text of the number or -1 in case TOO LONG (more than 1000000000000.99)
|
||||
*/
|
||||
function dolNumberToWord($numero, $langs, $numorcurrency = 'number')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -215,6 +215,7 @@ class CommActionRapport
|
|||
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -388,6 +388,6 @@ class pdf_ban extends ModeleBankAccountDoc
|
|||
global $conf;
|
||||
|
||||
$showdetails = empty($conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS) ? 0 : $conf->global->MAIN_GENERATE_DOCUMENTS_SHOW_FOOT_DETAILS;
|
||||
//return pdf_pagefoot($pdf,$outputlangs,'BANK_FREE_TEXT',$this->emetteur,$this->marge_basse,$this->marge_gauche,$this->page_hauteur,$object,$showdetails,$hidefreetext);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1109,6 +1109,7 @@ class pdf_standard extends ModeleExpenseReport
|
|||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ class mod_facture_mars extends ModeleNumRefFactures
|
|||
* @param Societe $objsoc Object third party
|
||||
* @param Facture $invoice Object invoice
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @return string Value if OK, 0 if KO
|
||||
* @return string|int Value if OK, 0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $invoice, $mode = 'next')
|
||||
{
|
||||
|
|
@ -233,6 +233,7 @@ class mod_facture_mars extends ModeleNumRefFactures
|
|||
return $prefix.$yymm."-".$num;
|
||||
} else {
|
||||
dol_print_error('', 'Bad parameter for getNextValue');
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -308,5 +308,6 @@ class mailing_advthirdparties extends MailingTargets
|
|||
$contactstatic->fetch($id);
|
||||
return $contactstatic->getNomUrl(0, '', 0, '', -1, 1);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1057,6 +1057,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||
$this->error = $this->db->lasterror();
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
|
|
|||
|
|
@ -546,6 +546,7 @@ class pdf_standard extends ModelePDFSuppliersPayments
|
|||
// Date
|
||||
$pdf->SetXY($this->page_largeur - $this->marge_droite - 30, $posy);
|
||||
$pdf->MultiCell(150, 4, date("d").' '.$outputlangs->transnoentitiesnoconv(date("F")).' '.date("Y"), 0, 'L', 1);
|
||||
return $posy;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
|
|
|
|||
|
|
@ -130,7 +130,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||
* @param Societe $objsoc Object third party
|
||||
* @param Facture $invoice Object invoice
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @return string Next ref value or last ref if $mode is 'last'
|
||||
* @return string|int Next ref value or last ref if $mode is 'last'
|
||||
*/
|
||||
public function getNextValue($objsoc = null, $invoice = null, $mode = 'next')
|
||||
{
|
||||
|
|
@ -198,6 +198,7 @@ class mod_takepos_ref_simple extends ModeleNumRefTakepos
|
|||
return $this->prefix.$pos_source.'-'.$yymm.'-'.$num;
|
||||
} else {
|
||||
dol_print_error('', 'Bad parameter for getNextValue');
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2100,6 +2100,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
return -1;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -609,6 +609,7 @@ class CommandeFournisseurDispatch extends CommonObjectLine
|
|||
return '<span class="hideonsmartphone">'.$langs->trans($this->statuts_short[$status]).' </span>'.img_picto($langs->trans($this->statuts[$status]), 'statut8');
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue