mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 03:23:48 +00:00
upgrade php-cs 3.49
This commit is contained in:
@@ -189,7 +189,7 @@ abstract class AbstractTask implements HasCenterInterface, HasScopeInterface
|
||||
return $this->closed;
|
||||
}
|
||||
|
||||
public function setAssignee(User $assignee = null)
|
||||
public function setAssignee(?User $assignee = null)
|
||||
{
|
||||
$this->assignee = $assignee;
|
||||
|
||||
|
@@ -112,7 +112,7 @@ class SingleTask extends AbstractTask
|
||||
* message="An end date is required if a warning interval is set"
|
||||
* )
|
||||
*/
|
||||
private null|\DateInterval $warningInterval = null;
|
||||
private \DateInterval|null $warningInterval = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
@@ -122,7 +122,7 @@ class SingleTask extends AbstractTask
|
||||
/**
|
||||
* Get endDate.
|
||||
*/
|
||||
public function getEndDate(): null|\DateTime
|
||||
public function getEndDate(): \DateTime|null
|
||||
{
|
||||
return $this->endDate;
|
||||
}
|
||||
@@ -184,7 +184,7 @@ class SingleTask extends AbstractTask
|
||||
/**
|
||||
* Get warningInterval.
|
||||
*/
|
||||
public function getWarningInterval(): null|\DateInterval
|
||||
public function getWarningInterval(): \DateInterval|null
|
||||
{
|
||||
return $this->warningInterval;
|
||||
}
|
||||
@@ -234,7 +234,7 @@ class SingleTask extends AbstractTask
|
||||
*
|
||||
* @return SingleTask
|
||||
*/
|
||||
public function setWarningInterval(null|\DateInterval $warningInterval)
|
||||
public function setWarningInterval(\DateInterval|null $warningInterval)
|
||||
{
|
||||
$this->warningInterval = $warningInterval;
|
||||
|
||||
|
@@ -28,7 +28,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
}
|
||||
|
||||
public function buildBaseQuery(
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?array $types = [],
|
||||
?array $users = []
|
||||
@@ -150,7 +150,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
|
||||
public function buildQueryByCourse(
|
||||
AccompanyingPeriod $course,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
): QueryBuilder {
|
||||
$qb = $this->buildBaseQuery($pattern, $flags);
|
||||
@@ -162,7 +162,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
|
||||
public function buildQueryByPerson(
|
||||
Person $person,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
): QueryBuilder {
|
||||
$qb = $this->buildBaseQuery($pattern, $flags);
|
||||
@@ -173,7 +173,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
}
|
||||
|
||||
public function buildQueryMyTasks(
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
): QueryBuilder {
|
||||
$qb = $this->buildBaseQuery($pattern, $flags);
|
||||
@@ -184,7 +184,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
}
|
||||
|
||||
public function countByAllViewable(
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?array $types = [],
|
||||
?array $users = []
|
||||
@@ -199,7 +199,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
|
||||
public function countByCourse(
|
||||
AccompanyingPeriod $course,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
): int {
|
||||
$qb = $this->buildQueryByCourse($course, $pattern, $flags);
|
||||
@@ -211,7 +211,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
}
|
||||
|
||||
public function countByCurrentUsersTasks(
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
): int {
|
||||
return $this->buildQueryMyTasks($pattern, $flags)
|
||||
@@ -221,7 +221,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
|
||||
public function countByPerson(
|
||||
Person $person,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
): int {
|
||||
$qb = $this->buildQueryByPerson($person, $pattern, $flags);
|
||||
@@ -233,7 +233,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
}
|
||||
|
||||
public function findByAllViewable(
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?array $types = [],
|
||||
?array $users = [],
|
||||
@@ -249,7 +249,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
|
||||
public function findByCourse(
|
||||
AccompanyingPeriod $course,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
@@ -262,7 +262,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
}
|
||||
|
||||
public function findByCurrentUsersTasks(
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
@@ -275,7 +275,7 @@ final readonly class SingleTaskAclAwareRepository implements SingleTaskAclAwareR
|
||||
|
||||
public function findByPerson(
|
||||
Person $person,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
|
@@ -17,7 +17,7 @@ use Chill\PersonBundle\Entity\Person;
|
||||
interface SingleTaskAclAwareRepositoryInterface
|
||||
{
|
||||
public function countByAllViewable(
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?array $types = [],
|
||||
?array $users = []
|
||||
@@ -25,20 +25,20 @@ interface SingleTaskAclAwareRepositoryInterface
|
||||
|
||||
public function countByCourse(
|
||||
AccompanyingPeriod $course,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
): int;
|
||||
|
||||
public function countByCurrentUsersTasks(string $pattern = null, ?array $flags = []): int;
|
||||
public function countByCurrentUsersTasks(?string $pattern = null, ?array $flags = []): int;
|
||||
|
||||
public function countByPerson(
|
||||
Person $person,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = []
|
||||
): int;
|
||||
|
||||
public function findByAllViewable(
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?array $types = [],
|
||||
?array $users = [],
|
||||
@@ -49,18 +49,18 @@ interface SingleTaskAclAwareRepositoryInterface
|
||||
|
||||
public function findByCourse(
|
||||
AccompanyingPeriod $course,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
?array $orderBy = []
|
||||
): array;
|
||||
|
||||
public function findByCurrentUsersTasks(string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, ?array $orderBy = []): array;
|
||||
public function findByCurrentUsersTasks(?string $pattern = null, ?array $flags = [], ?int $start = 0, ?int $limit = 50, ?array $orderBy = []): array;
|
||||
|
||||
public function findByPerson(
|
||||
Person $person,
|
||||
string $pattern = null,
|
||||
?string $pattern = null,
|
||||
?array $flags = [],
|
||||
?int $start = 0,
|
||||
?int $limit = 50,
|
||||
|
@@ -56,7 +56,7 @@ class SingleTaskRepository extends EntityRepository
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function countByParameters($params, User $currentUser = null)
|
||||
public function countByParameters($params, ?User $currentUser = null)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('st')
|
||||
->select('COUNT(st)');
|
||||
@@ -175,7 +175,7 @@ class SingleTaskRepository extends EntityRepository
|
||||
$qb->where($where);
|
||||
}
|
||||
|
||||
protected function buildQuery(QueryBuilder $qb, $params, User $currentUser = null)
|
||||
protected function buildQuery(QueryBuilder $qb, $params, ?User $currentUser = null)
|
||||
{
|
||||
if (null !== $currentUser) {
|
||||
$this->buildACLQuery($qb, $currentUser);
|
||||
|
@@ -26,7 +26,7 @@ class AuthorizationEvent extends \Symfony\Contracts\EventDispatcher\Event
|
||||
protected $vote;
|
||||
|
||||
public function __construct(
|
||||
private readonly null|AbstractTask|AccompanyingPeriod|Person $subject,
|
||||
private readonly AbstractTask|AccompanyingPeriod|Person|null $subject,
|
||||
private readonly string $attribute,
|
||||
private readonly TokenInterface $token
|
||||
) {
|
||||
|
@@ -39,7 +39,7 @@ class TaskTwigExtension extends AbstractExtension
|
||||
AbstractTask $task,
|
||||
string $key,
|
||||
$metadataSubject = null,
|
||||
string $name = null
|
||||
?string $name = null
|
||||
) {
|
||||
return $this->taskWorkflowManager->getWorkflowMetadata($task, $key, $metadataSubject, $name);
|
||||
}
|
||||
|
@@ -56,7 +56,7 @@ class TaskWorkflowManager implements WorkflowSupportStrategyInterface
|
||||
return $definitions[0];
|
||||
}
|
||||
|
||||
public function getWorkflowMetadata(AbstractTask $task, string $key, $metadataSubject = null, string $name = null)
|
||||
public function getWorkflowMetadata(AbstractTask $task, string $key, $metadataSubject = null, ?string $name = null)
|
||||
{
|
||||
return $this->getTaskWorkflowDefinition($task)
|
||||
->getWorkflowMetadata($task, $key, $metadataSubject);
|
||||
|
Reference in New Issue
Block a user