diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveCenterHistoryHandler.php b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveCenterHistoryHandler.php index 3bf8da3d3..358a5ea9a 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveCenterHistoryHandler.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/Handler/PersonMoveCenterHistoryHandler.php @@ -18,7 +18,7 @@ use Chill\PersonBundle\Repository\Person\PersonCenterHistoryRepository; class PersonMoveCenterHistoryHandler implements PersonMoveSqlHandlerInterface { public function __construct( - private PersonCenterHistoryRepository $centerHistoryRepository, + private readonly PersonCenterHistoryRepository $centerHistoryRepository, ) {} public function supports(string $className, string $field): bool diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php index 80fde1367..fa0c71263 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMove.php @@ -36,9 +36,9 @@ use function in_array; class PersonMove { public function __construct( - private EntityManagerInterface $em, - private PersonMoveManager $personMoveManager, - private EventDispatcherInterface $eventDispatcher + private readonly EntityManagerInterface $em, + private readonly PersonMoveManager $personMoveManager, + private readonly EventDispatcherInterface $eventDispatcher ) {} /** @@ -95,7 +95,7 @@ class PersonMove $sql, ['to' => $to->getId(), 'original_action' => 'move'] ); - $this->eventDispatcher->dispatch(ActionEvent::DELETE, $event); + $this->eventDispatcher->dispatch($event, ActionEvent::DELETE); $sqls = array_merge($sqls, $event->getPreSql(), [$event->getSqlStatement()], $event->getPostSql()); } else { $sqls = array_merge($sqls, $this->createMoveSQLs($metadata, $from, $to, $field)); diff --git a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMoveManager.php b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMoveManager.php index 854b9e99e..8680880bd 100644 --- a/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMoveManager.php +++ b/src/Bundle/ChillPersonBundle/Actions/Remove/PersonMoveManager.php @@ -19,12 +19,11 @@ class PersonMoveManager /** * @var iterable */ - private iterable $handlers, + private readonly iterable $handlers, ) {} /** * @param class-string $className - * @param string $field * @return bool */ public function hasHandler(string $className, string $field): bool diff --git a/src/Bundle/ChillPersonBundle/Tests/Action/Remove/PersonMoveTest.php b/src/Bundle/ChillPersonBundle/Tests/Action/Remove/PersonMoveTest.php index 0b2201b37..ce3d8a3d1 100644 --- a/src/Bundle/ChillPersonBundle/Tests/Action/Remove/PersonMoveTest.php +++ b/src/Bundle/ChillPersonBundle/Tests/Action/Remove/PersonMoveTest.php @@ -47,7 +47,7 @@ class PersonMoveTest extends KernelTestCase /** * @var list */ - private static $entitiesToDelete = []; + private static array $entitiesToDelete = []; public function setUp(): void { diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php index 962eb6536..d90f3fb73 100644 --- a/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php +++ b/src/Bundle/ChillTaskBundle/Entity/Task/AbstractTaskPlaceEvent.php @@ -41,15 +41,6 @@ class AbstractTaskPlaceEvent */ private $datetime; - /** - * @var int - * - * @ORM\Column(name="id", type="integer") - * @ORM\Id - * @ORM\GeneratedValue(strategy="AUTO") - */ - private ?int $id = null; - /** * @ORM\Column(name="transition", type="string", length=255) */ @@ -83,16 +74,6 @@ class AbstractTaskPlaceEvent return $this->datetime; } - /** - * Get id. - * - * @return int - */ - public function getId() - { - return $this->id; - } - /** * Get transition. * diff --git a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php index a2524c748..572e466b3 100644 --- a/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php +++ b/src/Bundle/ChillTaskBundle/Entity/Task/SingleTaskPlaceEvent.php @@ -32,8 +32,6 @@ use Doctrine\ORM\Mapping as ORM; class SingleTaskPlaceEvent extends AbstractTaskPlaceEvent { /** - * @var int - * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO")