Skip to content

Commit

Permalink
Merge pull request Dolibarr#27853 from thibdrev/patch-4
Browse files Browse the repository at this point in the history
qual: phpstan for htdocs/accountancy/class/bookkeeping.class.php
  • Loading branch information
eldy authored Jan 29, 2024
2 parents 2f4d00f + eda4b0c commit 22b42d8
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions htdocs/accountancy/class/bookkeeping.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1802,10 +1802,10 @@ public function fetchPerMvt($piecenum, $mode = '')
}

/**
* Return next number movement
* Return next movement number
*
* @param string $mode Mode
* @return int Return integer <0 if KO, >0 if OK (Next numero to use)
* @param string $mode Mode
* @return int<1, max>|-1 Return next movement number or -1 if error
*/
public function getNextNumMvt($mode = '')
{
Expand All @@ -1830,7 +1830,7 @@ public function getNextNumMvt($mode = '')
} else {
$this->error = "Error ".$this->db->lasterror();
dol_syslog(get_class($this)."::getNextNumMvt ".$this->error, LOG_ERR);
return "-1";
return -1;
}
}

Expand Down Expand Up @@ -2253,7 +2253,7 @@ public function get_compte_desc($account = null)
*
* @param string $alias Bookkeeping alias table
* @param bool $force Force reload
* @return string SQL filter
* @return string|null SQL filter or null if error
*/
public function getCanModifyBookkeepingSQL($alias = '', $force = false)
{
Expand Down Expand Up @@ -2621,7 +2621,7 @@ public function accountingResult($date_start, $date_end)
}
}

return $income_statement_amount;
return (string) $income_statement_amount;
}

/**
Expand Down Expand Up @@ -2761,7 +2761,7 @@ public function closeFiscalPeriod($fiscal_period_id, $new_fiscal_period_id, $sep

$bookkeeping = new BookKeeping($this->db);
$bookkeeping->doc_date = $new_fiscal_period->date_start;
$bookkeeping->date_lim_reglement = (string) '';
$bookkeeping->date_lim_reglement = 0;
$bookkeeping->doc_ref = $new_fiscal_period->label;
$bookkeeping->date_creation = $now;
$bookkeeping->doc_type = 'closure';
Expand Down Expand Up @@ -2808,7 +2808,7 @@ public function closeFiscalPeriod($fiscal_period_id, $new_fiscal_period_id, $sep

$bookkeeping = new BookKeeping($this->db);
$bookkeeping->doc_date = $new_fiscal_period->date_start;
$bookkeeping->date_lim_reglement = (string) '';
$bookkeeping->date_lim_reglement = 0;
$bookkeeping->doc_ref = $new_fiscal_period->label;
$bookkeeping->date_creation = $now;
$bookkeeping->doc_type = 'closure';
Expand Down

0 comments on commit 22b42d8

Please sign in to comment.