bump tests to phpstan level 5 (#1922)

This commit is contained in:
Kevin Papst
2020-09-05 16:48:19 +02:00
committed by GitHub
parent b69ea0648c
commit ed528eb19a
35 changed files with 128 additions and 93 deletions

View File

@@ -25,11 +25,11 @@ class TimesheetStatistic
*/
protected $durationTotal = 0;
/**
* @var int
* @var float
*/
protected $amountThisMonth = 0;
/**
* @var int
* @var float
*/
protected $amountTotal = 0;
/**
@@ -54,17 +54,24 @@ class TimesheetStatistic
$this->durationThisMonth = (int) $durationThisMonth;
}
public function getAmountTotal(): int
/**
* This is actually the rate, wrong wording...
*
* @return float
*/
public function getAmountTotal(): float
{
return $this->amountTotal;
}
/**
* @param int $amountTotal
* This is actually the rate, wrong wording...
*
* @param float|int $amountTotal
*/
public function setAmountTotal($amountTotal)
{
$this->amountTotal = (int) $amountTotal;
$this->amountTotal = (float) $amountTotal;
}
public function getDurationTotal(): int
@@ -80,17 +87,24 @@ class TimesheetStatistic
$this->durationTotal = (int) $durationTotal;
}
public function getAmountThisMonth(): int
/**
* This is actually the rate, wrong wording...
*
* @return float
*/
public function getAmountThisMonth(): float
{
return $this->amountThisMonth;
}
/**
* @param int $amountThisMonth
* This is actually the rate, wrong wording...
*
* @param float|int $amountThisMonth
*/
public function setAmountThisMonth($amountThisMonth)
{
$this->amountThisMonth = (int) $amountThisMonth;
$this->amountThisMonth = (float) $amountThisMonth;
}
public function getFirstEntry(): ?\DateTime