Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -9,25 +9,28 @@
|
||||
|
||||
namespace App\Model;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class TimesheetCountedStatistic implements \JsonSerializable
|
||||
{
|
||||
private $counter = 0;
|
||||
private $recordDuration = 0;
|
||||
private $recordRate = 0.0;
|
||||
private $recordInternalRate = 0.0;
|
||||
private int $counter = 0;
|
||||
private int $recordDuration = 0;
|
||||
private float $recordRate = 0.0;
|
||||
private float $internalRate = 0.0;
|
||||
|
||||
private $counterBillable = 0;
|
||||
private $recordDurationBillable = 0;
|
||||
private $recordRateBillable = 0.0;
|
||||
private $internalRateBillable = 0.0;
|
||||
private int $counterBillable = 0;
|
||||
private int $recordDurationBillable = 0;
|
||||
private float $recordRateBillable = 0.0;
|
||||
private float $internalRateBillable = 0.0;
|
||||
|
||||
private $recordRateBillableExported = 0.0;
|
||||
private $recordDurationBillableExported = 0;
|
||||
private float $recordRateBillableExported = 0.0;
|
||||
private int $recordDurationBillableExported = 0;
|
||||
|
||||
private $counterExported = 0;
|
||||
private $recordDurationExported = 0;
|
||||
private $recordRateExported = 0.0;
|
||||
private $internalRateExported = 0.0;
|
||||
private int $counterExported = 0;
|
||||
private int $recordDurationExported = 0;
|
||||
private float $recordRateExported = 0.0;
|
||||
private float $internalRateExported = 0.0;
|
||||
|
||||
/**
|
||||
* For unified access, used in frontend.
|
||||
@@ -64,28 +67,6 @@ class TimesheetCountedStatistic implements \JsonSerializable
|
||||
$this->counterExported = $counter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total amount of included timesheet records.
|
||||
*
|
||||
* @return int
|
||||
* @deprecated since 1.15 use getCounter() instead
|
||||
*/
|
||||
public function getRecordAmount()
|
||||
{
|
||||
return $this->getCounter();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $recordAmount
|
||||
* @return $this
|
||||
*/
|
||||
public function setRecordAmount($recordAmount)
|
||||
{
|
||||
$this->setCounter((int) $recordAmount);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* For unified access, used in frontend.
|
||||
*
|
||||
@@ -111,27 +92,6 @@ class TimesheetCountedStatistic implements \JsonSerializable
|
||||
return $this->recordDuration;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total duration of all included timesheet records.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getRecordDuration(): int
|
||||
{
|
||||
return $this->getDuration();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param int $recordDuration
|
||||
* @return $this
|
||||
*/
|
||||
public function setRecordDuration($recordDuration)
|
||||
{
|
||||
$this->setDuration((int) $recordDuration);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* For unified access, used in frontend.
|
||||
*
|
||||
@@ -142,40 +102,11 @@ class TimesheetCountedStatistic implements \JsonSerializable
|
||||
return $this->recordRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total rate of all included timesheet records.
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getRecordRate(): float
|
||||
{
|
||||
return $this->getRate();
|
||||
}
|
||||
|
||||
public function setRate(float $rate): void
|
||||
{
|
||||
$this->recordRate = $rate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param float $recordRate
|
||||
* @return $this
|
||||
*/
|
||||
public function setRecordRate($recordRate)
|
||||
{
|
||||
$this->setRate((float) $recordRate);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 1.15 use getInternalRate() instead
|
||||
*/
|
||||
public function getRecordInternalRate(): float
|
||||
{
|
||||
return $this->getInternalRate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the total internal rate of all included timesheet records.
|
||||
*
|
||||
@@ -183,7 +114,7 @@ class TimesheetCountedStatistic implements \JsonSerializable
|
||||
*/
|
||||
public function getInternalRate(): float
|
||||
{
|
||||
return $this->recordInternalRate;
|
||||
return $this->internalRate;
|
||||
}
|
||||
|
||||
public function getInternalRateBillable(): float
|
||||
@@ -206,34 +137,9 @@ class TimesheetCountedStatistic implements \JsonSerializable
|
||||
$this->internalRateExported = $internalRateExported;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param float $recordInternalRate
|
||||
* @return $this
|
||||
* @deprecated since 1.15 use setInternalRate() instead
|
||||
*/
|
||||
public function setRecordInternalRate($recordInternalRate)
|
||||
{
|
||||
$this->setInternalRate((float) $recordInternalRate);
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function setInternalRate(float $internalRate): void
|
||||
{
|
||||
$this->recordInternalRate = $internalRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated since 1.15 use getCounterBillable() instead
|
||||
*/
|
||||
public function getRecordAmountBillable(): int
|
||||
{
|
||||
return $this->getCounterBillable();
|
||||
}
|
||||
|
||||
public function setRecordAmountBillable(int $recordAmount): void
|
||||
{
|
||||
$this->setCounterBillable($recordAmount);
|
||||
$this->internalRate = $internalRate;
|
||||
}
|
||||
|
||||
public function getDurationBillable(): int
|
||||
@@ -296,8 +202,7 @@ class TimesheetCountedStatistic implements \JsonSerializable
|
||||
$this->recordRateExported = $recordRate;
|
||||
}
|
||||
|
||||
#[\ReturnTypeWillChange]
|
||||
public function jsonSerialize()
|
||||
public function jsonSerialize(): mixed
|
||||
{
|
||||
return [
|
||||
'duration' => $this->recordDuration,
|
||||
@@ -308,7 +213,7 @@ class TimesheetCountedStatistic implements \JsonSerializable
|
||||
'rate_billable' => $this->recordRateBillable,
|
||||
'rate_exported' => $this->recordRateExported,
|
||||
'rate_billable_exported' => $this->recordRateBillableExported,
|
||||
'rate_internal' => $this->recordInternalRate,
|
||||
'rate_internal' => $this->internalRate,
|
||||
'rate_internal_exported' => $this->internalRateExported,
|
||||
'amount' => $this->counter,
|
||||
'amount_billable' => $this->counterBillable,
|
||||
|
||||
Reference in New Issue
Block a user