mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-20 14:43:49 +00:00
fix cs
This commit is contained in:
@@ -1,5 +1,14 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Chill is a software for social workers
|
||||
*
|
||||
* For the full copyright and license information, please view
|
||||
* the LICENSE file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Chill\CalendarBundle\Messenger\Handler;
|
||||
|
||||
use Chill\CalendarBundle\Messenger\Message\CalendarRemovedMessage;
|
||||
@@ -9,21 +18,18 @@ use Chill\MainBundle\Repository\UserRepositoryInterface;
|
||||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface;
|
||||
|
||||
/**
|
||||
* Handle the deletion of calendar
|
||||
* Handle the deletion of calendar.
|
||||
*
|
||||
* @AsMessageHandler
|
||||
*/
|
||||
class CalendarRemoveHandler implements MessageHandlerInterface
|
||||
{
|
||||
private RemoteCalendarConnectorInterface $remoteCalendarConnector;
|
||||
private CalendarRangeRepository $calendarRangeRepository;
|
||||
|
||||
private RemoteCalendarConnectorInterface $remoteCalendarConnector;
|
||||
|
||||
private UserRepositoryInterface $userRepository;
|
||||
|
||||
/**
|
||||
* @param RemoteCalendarConnectorInterface $remoteCalendarConnector
|
||||
* @param CalendarRangeRepository $calendarRangeRepository
|
||||
* @param UserRepositoryInterface $userRepository
|
||||
*/
|
||||
public function __construct(RemoteCalendarConnectorInterface $remoteCalendarConnector, CalendarRangeRepository $calendarRangeRepository, UserRepositoryInterface $userRepository)
|
||||
{
|
||||
$this->remoteCalendarConnector = $remoteCalendarConnector;
|
||||
|
@@ -16,6 +16,8 @@ use Chill\MainBundle\Entity\User;
|
||||
|
||||
class CalendarRemovedMessage
|
||||
{
|
||||
private ?int $associatedCalendarRangeId = null;
|
||||
|
||||
private ?int $byUserId = null;
|
||||
|
||||
private int $calendarUserId;
|
||||
@@ -24,8 +26,6 @@ class CalendarRemovedMessage
|
||||
|
||||
private string $remoteId;
|
||||
|
||||
private ?int $associatedCalendarRangeId = null;
|
||||
|
||||
public function __construct(Calendar $calendar, ?User $byUser)
|
||||
{
|
||||
$this->remoteId = $calendar->getRemoteId();
|
||||
@@ -41,6 +41,11 @@ class CalendarRemovedMessage
|
||||
}
|
||||
}
|
||||
|
||||
public function getAssociatedCalendarRangeId(): ?int
|
||||
{
|
||||
return $this->associatedCalendarRangeId;
|
||||
}
|
||||
|
||||
public function getByUserId(): ?int
|
||||
{
|
||||
return $this->byUserId;
|
||||
@@ -60,14 +65,4 @@ class CalendarRemovedMessage
|
||||
{
|
||||
return $this->remoteId;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int|null
|
||||
*/
|
||||
public function getAssociatedCalendarRangeId(): ?int
|
||||
{
|
||||
return $this->associatedCalendarRangeId;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user