Next major version 2 with PHP 8.1, Symfony 6, Tabler UI, 2FA ... (#2902)

This commit is contained in:
Kevin Papst
2022-12-31 21:19:55 +01:00
committed by GitHub
parent 95e06746bd
commit 90a0fd8a22
2164 changed files with 83700 additions and 86426 deletions

View File

@@ -15,31 +15,12 @@ use DateTime;
final class ProjectViewQuery
{
/**
* @var Customer|null
*/
private $customer;
/**
* @var DateTime
*/
private $today;
/**
* @var User|null
*/
private $user;
/**
* @var bool
*/
private $includeNoBudget = false;
/**
* @var bool
*/
private $includeNoWork = false;
private ?Customer $customer = null;
private bool $includeNoWork = false;
private ?bool $budgetType = true;
public function __construct(DateTime $today, User $user)
public function __construct(private DateTime $today, private User $user)
{
$this->today = $today;
$this->user = $user;
}
public function getUser(): ?User
@@ -47,14 +28,27 @@ final class ProjectViewQuery
return $this->user;
}
public function isIncludeNoBudget(): bool
public function getBudgetType(): ?bool
{
return $this->includeNoBudget;
return $this->budgetType;
}
public function setIncludeNoBudget(bool $includeNoBudget): void
/**
* @internal
*/
public function setBudgetType(?bool $budgetType): void
{
$this->includeNoBudget = $includeNoBudget;
$this->budgetType = $budgetType;
}
public function isIncludeWithoutBudget(): bool
{
return $this->budgetType === false;
}
public function isIncludeWithBudget(): bool
{
return $this->budgetType === true;
}
public function isIncludeNoWork(): bool