Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)
This commit is contained in:
@@ -11,9 +11,6 @@ namespace App\Model\Statistic;
|
||||
|
||||
use App\Model\TimesheetCountedStatistic;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
*/
|
||||
class BudgetStatistic extends TimesheetCountedStatistic
|
||||
{
|
||||
}
|
||||
|
||||
@@ -11,24 +11,13 @@ namespace App\Model\Statistic;
|
||||
|
||||
use DateTime;
|
||||
|
||||
class Day extends Timesheet
|
||||
final class Day extends Timesheet
|
||||
{
|
||||
/**
|
||||
* @var int|null
|
||||
*/
|
||||
private $totalDurationBillable = 0;
|
||||
/**
|
||||
* @var DateTime
|
||||
*/
|
||||
protected $day;
|
||||
/**
|
||||
* @var array
|
||||
*/
|
||||
protected $details = [];
|
||||
private int $totalDurationBillable = 0;
|
||||
private array $details = [];
|
||||
|
||||
public function __construct(DateTime $day, int $duration, float $rate)
|
||||
public function __construct(private DateTime $day, int $duration, float $rate)
|
||||
{
|
||||
$this->day = $day;
|
||||
$this->setTotalDuration($duration);
|
||||
$this->setTotalRate($rate);
|
||||
}
|
||||
|
||||
@@ -13,9 +13,9 @@ use InvalidArgumentException;
|
||||
|
||||
final class Month extends Timesheet
|
||||
{
|
||||
private $month;
|
||||
private $billableDuration = 0;
|
||||
private $billableRate = 0.00;
|
||||
private string $month;
|
||||
private int $billableDuration = 0;
|
||||
private float $billableRate = 0.00;
|
||||
|
||||
/**
|
||||
* @param string|int $month
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace App\Model\Statistic;
|
||||
|
||||
final class StatisticDate extends Timesheet
|
||||
{
|
||||
private $date;
|
||||
private $billableDuration = 0;
|
||||
private $billableRate = 0.00;
|
||||
private \DateTimeInterface $date;
|
||||
private int $billableDuration = 0;
|
||||
private float $billableRate = 0.00;
|
||||
|
||||
public function __construct(\DateTimeInterface $date)
|
||||
{
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace App\Model\Statistic;
|
||||
|
||||
class Timesheet
|
||||
{
|
||||
private $totalDuration = 0;
|
||||
private $totalRate = 0.00;
|
||||
private $totalInternalRate = 0.00;
|
||||
private int $totalDuration = 0;
|
||||
private float $totalRate = 0.00;
|
||||
private float $totalInternalRate = 0.00;
|
||||
|
||||
/**
|
||||
* For unified access, used in frontend.
|
||||
|
||||
@@ -13,19 +13,8 @@ use App\Entity\User;
|
||||
|
||||
final class UserYear
|
||||
{
|
||||
/**
|
||||
* @var Year
|
||||
*/
|
||||
private $year;
|
||||
/**
|
||||
* @var User
|
||||
*/
|
||||
private $user;
|
||||
|
||||
public function __construct(User $user, Year $year)
|
||||
public function __construct(private User $user, private Year $year)
|
||||
{
|
||||
$this->user = $user;
|
||||
$this->year = $year;
|
||||
}
|
||||
|
||||
public function getYear(): Year
|
||||
|
||||
@@ -11,17 +11,15 @@ namespace App\Model\Statistic;
|
||||
|
||||
final class Year extends Timesheet
|
||||
{
|
||||
private $year;
|
||||
/**
|
||||
* @var Month[]
|
||||
*/
|
||||
private $months = [];
|
||||
private $billableDuration = 0;
|
||||
private $billableRate = 0.00;
|
||||
private array $months = [];
|
||||
private int $billableDuration = 0;
|
||||
private float $billableRate = 0.00;
|
||||
|
||||
public function __construct(string $year)
|
||||
public function __construct(private string $year)
|
||||
{
|
||||
$this->year = $year;
|
||||
}
|
||||
|
||||
public function getYear(): string
|
||||
|
||||
Reference in New Issue
Block a user