new cs rule: single_line_empty_body

Rule is added to the last version of php-cs-fixer
This commit is contained in:
2023-09-12 15:58:59 +02:00
parent b9231a91a3
commit d2323e91ca
606 changed files with 639 additions and 1804 deletions

View File

@@ -24,9 +24,7 @@ use Chill\MainBundle\Templating\TranslatableStringHelperInterface;
class AddressConverter
{
public function __construct(private readonly AddressRender $addressRender, private readonly TranslatableStringHelperInterface $translatableStringHelper)
{
}
public function __construct(private readonly AddressRender $addressRender, private readonly TranslatableStringHelperInterface $translatableStringHelper) {}
public function addressToRemote(Address $address): array
{

View File

@@ -30,9 +30,7 @@ use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
*/
class EventsOnUserSubscriptionCreator
{
public function __construct(private readonly LoggerInterface $logger, private readonly MachineHttpClient $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UrlGeneratorInterface $urlGenerator)
{
}
public function __construct(private readonly LoggerInterface $logger, private readonly MachineHttpClient $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly UrlGeneratorInterface $urlGenerator) {}
/**
* @throws ClientExceptionInterface

View File

@@ -22,9 +22,7 @@ use Chill\MainBundle\Entity\Location;
class LocationConverter
{
public function __construct(private readonly AddressConverter $addressConverter)
{
}
public function __construct(private readonly AddressConverter $addressConverter) {}
public function locationToRemote(Location $location): array
{

View File

@@ -28,8 +28,7 @@ final readonly class MSUserAbsenceReader implements MSUserAbsenceReaderInterface
private HttpClientInterface $machineHttpClient,
private MapCalendarToUser $mapCalendarToUser,
private ClockInterface $clock,
) {
}
) {}
/**
* @throw UserAbsenceSyncException when the data cannot be reached or is not valid from microsoft

View File

@@ -21,8 +21,7 @@ readonly class MSUserAbsenceSync
private MSUserAbsenceReaderInterface $absenceReader,
private ClockInterface $clock,
private LoggerInterface $logger,
) {
}
) {}
public function syncUserAbsence(User $user): void
{

View File

@@ -29,9 +29,7 @@ class MachineTokenStorage
private ?AccessTokenInterface $accessToken = null;
public function __construct(private readonly Azure $azure, private readonly ChillRedis $chillRedis)
{
}
public function __construct(private readonly Azure $azure, private readonly ChillRedis $chillRedis) {}
public function getToken(): AccessTokenInterface
{

View File

@@ -39,9 +39,7 @@ class MapCalendarToUser
final public const SECRET_SUBSCRIPTION_EVENT = 'subscription_events_secret';
public function __construct(private readonly HttpClientInterface $machineHttpClient, private readonly LoggerInterface $logger)
{
}
public function __construct(private readonly HttpClientInterface $machineHttpClient, private readonly LoggerInterface $logger) {}
public function getActiveSubscriptionId(User $user): string
{

View File

@@ -30,9 +30,7 @@ class OnBehalfOfUserTokenStorage
{
final public const MS_GRAPH_ACCESS_TOKEN = 'msgraph_access_token';
public function __construct(private readonly Azure $azure, private readonly SessionInterface $session)
{
}
public function __construct(private readonly Azure $azure, private readonly SessionInterface $session) {}
public function getToken(): AccessToken
{

View File

@@ -33,9 +33,7 @@ class CalendarRangeSyncer
/**
* @param MachineHttpClient $machineHttpClient
*/
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient)
{
}
public function __construct(private readonly EntityManagerInterface $em, private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient) {}
public function handleCalendarRangeSync(CalendarRange $calendarRange, array $notification, User $user): void
{

View File

@@ -32,9 +32,7 @@ use function in_array;
class CalendarSyncer
{
public function __construct(private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient, private readonly UserRepositoryInterface $userRepository)
{
}
public function __construct(private readonly LoggerInterface $logger, private readonly HttpClientInterface $machineHttpClient, private readonly UserRepositoryInterface $userRepository) {}
public function handleCalendarSync(Calendar $calendar, array $notification, User $user): void
{

View File

@@ -45,9 +45,7 @@ class MSGraphRemoteCalendarConnector implements RemoteCalendarConnectorInterface
{
private array $cacheScheduleTimeForUser = [];
public function __construct(private readonly CalendarRepository $calendarRepository, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly HttpClientInterface $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly LoggerInterface $logger, private readonly OnBehalfOfUserTokenStorage $tokenStorage, private readonly OnBehalfOfUserHttpClient $userHttpClient, private readonly RemoteEventConverter $remoteEventConverter, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator, private readonly Security $security)
{
}
public function __construct(private readonly CalendarRepository $calendarRepository, private readonly CalendarRangeRepository $calendarRangeRepository, private readonly HttpClientInterface $machineHttpClient, private readonly MapCalendarToUser $mapCalendarToUser, private readonly LoggerInterface $logger, private readonly OnBehalfOfUserTokenStorage $tokenStorage, private readonly OnBehalfOfUserHttpClient $userHttpClient, private readonly RemoteEventConverter $remoteEventConverter, private readonly TranslatorInterface $translator, private readonly UrlGeneratorInterface $urlGenerator, private readonly Security $security) {}
public function countEventsForUser(User $user, DateTimeImmutable $startDate, DateTimeImmutable $endDate): int
{

View File

@@ -48,23 +48,13 @@ class NullRemoteCalendarConnector implements RemoteCalendarConnectorInterface
return [];
}
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void
{
}
public function removeCalendar(string $remoteId, array $remoteAttributes, User $user, ?CalendarRange $associatedCalendarRange = null): void {}
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void
{
}
public function removeCalendarRange(string $remoteId, array $remoteAttributes, User $user): void {}
public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void
{
}
public function syncCalendar(Calendar $calendar, string $action, ?CalendarRange $previousCalendarRange, ?User $previousMainUser, ?array $oldInvites, ?array $newInvites): void {}
public function syncCalendarRange(CalendarRange $calendarRange): void
{
}
public function syncCalendarRange(CalendarRange $calendarRange): void {}
public function syncInvite(Invite $invite): void
{
}
public function syncInvite(Invite $invite): void {}
}