DX: apply rector rules up to php8.0

This commit is contained in:
2023-04-15 01:05:37 +02:00
parent d8870e906f
commit dde3002100
714 changed files with 2348 additions and 9263 deletions

View File

@@ -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