2
0
forked from Wavyzz/dolibarr

qual: phpstan for htdocs/compta/facture/class/facture-rec.class.php (#28061)

* qual: phpstan for htdocs/compta/facture/class/facture-rec.class.php

htdocs/compta/facture/class/facture-rec.class.php	1271	Method FactureRec::strikeIfMaxNbGenReached() should return bool but returns string.
htdocs/compta/facture/class/facture-rec.class.php	1299	Property CommonObject::$output (string) does not accept null.

* typo

* phpcs
This commit is contained in:
thibdrev
2024-02-08 00:17:02 +01:00
committed by GitHub
parent cb7134871b
commit 21af889405

View File

@@ -1261,12 +1261,11 @@ class FactureRec extends CommonInvoice
* Format string to output with by striking the string if max number of generation was reached
*
* @param string $ret Default value to output
* @return boolean False by default, True if maximum number of generation is reached
* @return string html formatted string
*/
public function strikeIfMaxNbGenReached($ret)
{
// Special case to strike the date
return ($this->isMaxNbGenReached() ? '<strike>' : '').$ret.($this->isMaxNbGenReached() ? '</strike>' : '');
return $this->isMaxNbGenReached() ? '<strike>'.$ret.'</strike>' : $ret;
}
/**
@@ -1294,7 +1293,7 @@ class FactureRec extends CommonInvoice
$tmparray = dol_getdate($now);
$today = dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); // Today is last second of current day
$this->output = null;
$this->output = '';
dol_syslog("createRecurringInvoices restrictioninvoiceid=".$restrictioninvoiceid." forcevalidation=".$forcevalidation);