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

@@ -29,11 +29,6 @@ class TimelineBuilder implements ContainerAwareInterface
{
use \Symfony\Component\DependencyInjection\ContainerAwareTrait;
/**
* @var \Doctrine\ORM\EntityManagerInterface
*/
private $em;
/**
* Record provider.
*
@@ -52,9 +47,8 @@ class TimelineBuilder implements ContainerAwareInterface
*/
private $providersByContext = [];
public function __construct(EntityManagerInterface $em)
public function __construct(private EntityManagerInterface $em)
{
$this->em = $em;
}
/**
@@ -260,13 +254,11 @@ class TimelineBuilder implements ContainerAwareInterface
* get the template data from the provider for the given entity, by type.
*
* @param string $type
* @param mixed $entity
* @param string $context
* @param mixed[] $args
*
* @return array the template data fetched from the provider
*/
private function getTemplateData($type, $entity, $context, array $args)
private function getTemplateData($type, mixed $entity, $context, array $args)
{
foreach ($this->getProvidersByContext($context) as $provider) {
if ($provider->supportsType($type)) {

View File

@@ -15,34 +15,10 @@ use function strtr;
class TimelineSingleQuery
{
private ?string $date;
private bool $distinct = false;
private ?string $from;
private ?string $id;
private ?string $key;
private array $parameters = [];
private ?string $where;
public function __construct(
?string $id = null,
?string $date = null,
?string $key = null,
?string $from = null,
?string $where = null,
array $parameters = []
) {
$this->id = $id;
$this->date = $date;
$this->key = $key;
$this->from = $from;
$this->where = $where;
$this->parameters = $parameters;
public function __construct(private ?string $id = null, private ?string $date = null, private ?string $key = null, private ?string $from = null, private ?string $where = null, private array $parameters = [])
{
}
public function buildSql(): string