mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-29 19:13:49 +00:00
DX: apply rector rules up to php8.0
This commit is contained in:
@@ -35,28 +35,8 @@ use function strtr;
|
||||
*/
|
||||
class TimelineReportProvider implements TimelineProviderInterface
|
||||
{
|
||||
protected CustomFieldsHelper $customFieldsHelper;
|
||||
|
||||
protected EntityManager $em;
|
||||
|
||||
protected AuthorizationHelper $helper;
|
||||
|
||||
protected bool $showEmptyValues;
|
||||
|
||||
private Security $security;
|
||||
|
||||
public function __construct(
|
||||
EntityManager $em,
|
||||
AuthorizationHelper $helper,
|
||||
Security $security,
|
||||
CustomFieldsHelper $customFieldsHelper,
|
||||
$showEmptyValues
|
||||
) {
|
||||
$this->em = $em;
|
||||
$this->helper = $helper;
|
||||
$this->security = $security;
|
||||
$this->customFieldsHelper = $customFieldsHelper;
|
||||
$this->showEmptyValues = $showEmptyValues;
|
||||
public function __construct(protected EntityManager $em, protected AuthorizationHelper $helper, private Security $security, protected CustomFieldsHelper $customFieldsHelper, protected $showEmptyValues)
|
||||
{
|
||||
}
|
||||
|
||||
public function fetchQuery($context, array $args)
|
||||
@@ -212,16 +192,11 @@ class TimelineReportProvider implements TimelineProviderInterface
|
||||
|
||||
private function getWhereClause(string $context, array $args): array
|
||||
{
|
||||
switch ($context) {
|
||||
case 'person':
|
||||
return $this->getWhereClauseForPerson($context, $args);
|
||||
|
||||
case 'center':
|
||||
return $this->getWhereClauseForCenter($context, $args);
|
||||
|
||||
default:
|
||||
throw new UnexpectedValueException("This context {$context} is not implemented");
|
||||
}
|
||||
return match ($context) {
|
||||
'person' => $this->getWhereClauseForPerson($context, $args),
|
||||
'center' => $this->getWhereClauseForCenter($context, $args),
|
||||
default => throw new UnexpectedValueException("This context {$context} is not implemented"),
|
||||
};
|
||||
}
|
||||
|
||||
private function getWhereClauseForCenter(string $context, array $args): array
|
||||
|
Reference in New Issue
Block a user