apply rector rules: symfony **UP TO** 44

This commit is contained in:
2023-07-28 01:52:53 +02:00
parent b6a094aeee
commit c20f65eebb
88 changed files with 211 additions and 320 deletions

View File

@@ -16,7 +16,7 @@ use Symfony\Component\EventDispatcher\Event;
/**
* Event triggered when an entity attached to a person is removed.
*/
class ActionEvent extends Event
class ActionEvent extends \Symfony\Contracts\EventDispatcher\Event
{
final public const DELETE = 'CHILL_PERSON.DELETE_ASSOCIATED_ENTITY';

View File

@@ -100,7 +100,7 @@ class PersonMove
$sql,
['to' => $to->getId(), 'original_action' => 'move']
);
$this->eventDispatcher->dispatch(ActionEvent::DELETE, $event);
$this->eventDispatcher->dispatch($event, ActionEvent::DELETE);
} else {
$sql = $this->createMoveSQL($metadata, $from, $to, $field);
$event = new ActionEvent(
@@ -109,7 +109,7 @@ class PersonMove
$sql,
['to' => $to->getId(), 'original_action' => 'move']
);
$this->eventDispatcher->dispatch(ActionEvent::MOVE, $event);
$this->eventDispatcher->dispatch($event, ActionEvent::MOVE);
}
$sqls = array_merge($sqls, $event->getPreSql(), [$event->getSqlStatement()], $event->getPostSql());