php cs fixes

This commit is contained in:
2023-09-14 11:47:54 +02:00
parent 19789acbbe
commit b4f9501af5
110 changed files with 129 additions and 333 deletions

View File

@@ -150,9 +150,7 @@ abstract class AbstractCRUDController extends AbstractController
return new $class();
}
protected function customizeQuery(string $action, Request $request, $query): void
{
}
protected function customizeQuery(string $action, Request $request, $query): void {}
protected function getActionConfig(string $action)
{

View File

@@ -242,13 +242,9 @@ class CRUDController extends AbstractController
/**
* Customize the form created by createFormFor.
*/
protected function customizeForm(string $action, FormInterface $form)
{
}
protected function customizeForm(string $action, FormInterface $form) {}
protected function customizeQuery(string $action, Request $request, $query): void
{
}
protected function customizeQuery(string $action, Request $request, $query): void {}
/**
* @param $id
@@ -927,9 +923,7 @@ class CRUDController extends AbstractController
}
}
protected function onFormValid(string $action, object $entity, FormInterface $form, Request $request)
{
}
protected function onFormValid(string $action, object $entity, FormInterface $form, Request $request) {}
/**
* @param $action
@@ -952,77 +946,55 @@ class CRUDController extends AbstractController
/**
* @param $entity
*/
protected function onPostFlush(string $action, $entity, FormInterface $form, Request $request)
{
}
protected function onPostFlush(string $action, $entity, FormInterface $form, Request $request) {}
/**
* method used by indexAction.
*
* @param mixed $query
*/
protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $query)
{
}
protected function onPostIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $query) {}
/**
* method used by indexAction.
*
* @param mixed $entities
*/
protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $entities)
{
}
protected function onPostIndexFetchQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator, $entities) {}
/**
* @param $entity
*/
protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request)
{
}
protected function onPostPersist(string $action, $entity, FormInterface $form, Request $request) {}
/**
* @param $entity
*/
protected function onPostRemove(string $action, $entity, FormInterface $form, Request $request)
{
}
protected function onPostRemove(string $action, $entity, FormInterface $form, Request $request) {}
protected function onPreDelete(string $action, Request $request)
{
}
protected function onPreDelete(string $action, Request $request) {}
/**
* @param $entity
*/
protected function onPreFlush(string $action, $entity, FormInterface $form, Request $request)
{
}
protected function onPreFlush(string $action, $entity, FormInterface $form, Request $request) {}
protected function onPreIndex(string $action, Request $request)
{
}
protected function onPreIndex(string $action, Request $request) {}
/**
* method used by indexAction.
*/
protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator)
{
}
protected function onPreIndexBuildQuery(string $action, Request $request, int $totalItems, PaginatorInterface $paginator) {}
/**
* @param $entity
*/
protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request)
{
}
protected function onPrePersist(string $action, $entity, FormInterface $form, Request $request) {}
/**
* @param $entity
*/
protected function onPreRemove(string $action, $entity, FormInterface $form, Request $request)
{
}
protected function onPreRemove(string $action, $entity, FormInterface $form, Request $request) {}
/**
* Add ordering fields in the query build by self::queryEntities.

View File

@@ -16,6 +16,4 @@ use Symfony\Component\Form\AbstractType;
/**
* Class CRUDDeleteEntityForm.
*/
class CRUDDeleteEntityForm extends AbstractType
{
}
class CRUDDeleteEntityForm extends AbstractType {}

View File

@@ -213,14 +213,8 @@ class LoadPostalCodesCommand extends Command
}
}
class ExistingPostalCodeException extends Exception
{
}
class ExistingPostalCodeException extends Exception {}
class CountryCodeNotFoundException extends Exception
{
}
class CountryCodeNotFoundException extends Exception {}
class PostalCodeNotValidException extends Exception
{
}
class PostalCodeNotValidException extends Exception {}

View File

@@ -13,6 +13,4 @@ namespace Chill\MainBundle\Controller;
use Chill\MainBundle\CRUD\Controller\CRUDController;
class LocationTypeController extends CRUDController
{
}
class LocationTypeController extends CRUDController {}

View File

@@ -44,7 +44,5 @@ class LoginController extends AbstractController
]);
}
public function LoginCheckAction(Request $request)
{
}
public function LoginCheckAction(Request $request) {}
}

View File

@@ -50,8 +50,7 @@ final class PermissionsGroupController extends AbstractController
private readonly EntityManagerInterface $em,
private readonly PermissionsGroupRepository $permissionsGroupRepository,
private readonly RoleScopeRepository $roleScopeRepository,
) {
}
) {}
/**
*/

View File

@@ -27,8 +27,7 @@ final readonly class UserExportController
private UserRepositoryInterface $userRepository,
private Security $security,
private TranslatorInterface $translator,
) {
}
) {}
/**
* @throws \League\Csv\CannotInsertRecord

View File

@@ -175,9 +175,7 @@ class User implements UserInterface
return $this;
}
public function eraseCredentials()
{
}
public function eraseCredentials() {}
public function getAbsenceStart(): ?DateTimeImmutable
{

View File

@@ -26,8 +26,7 @@ final readonly class ExportFormHelper
private AuthorizationHelperForCurrentUserInterface $authorizationHelper,
private ExportManager $exportManager,
private FormFactoryInterface $formFactory,
) {
}
) {}
public function getDefaultData(string $step, ExportInterface|DirectExportInterface $export, array $options = []): array
{

View File

@@ -20,6 +20,4 @@ namespace Chill\MainBundle\Export;
*
* When used, the `ExportManager` will not handle aggregator for this class.
*/
interface ListInterface extends ExportInterface
{
}
interface ListInterface extends ExportInterface {}

View File

@@ -19,9 +19,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
class AggregatorType extends AbstractType
{
public function __construct()
{
}
public function __construct() {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -21,9 +21,7 @@ class FilterType extends AbstractType
{
public const ENABLED_FIELD = 'enabled';
public function __construct()
{
}
public function __construct() {}
public function buildForm(FormBuilderInterface $builder, array $options)
{

View File

@@ -13,6 +13,4 @@ namespace Chill\MainBundle\Notification\Exception;
use RuntimeException;
class NotificationHandlerNotFound extends RuntimeException
{
}
class NotificationHandlerNotFound extends RuntimeException {}

View File

@@ -16,6 +16,4 @@ use Redis;
/**
* Redis client configured by chill main.
*/
class ChillRedis extends Redis
{
}
class ChillRedis extends Redis {}

View File

@@ -13,6 +13,4 @@ namespace Chill\MainBundle\Search;
use Exception;
class ParsingException extends Exception
{
}
class ParsingException extends Exception {}

View File

@@ -24,6 +24,4 @@ use const E_USER_DEPRECATED;
*
* This abstract Voter provide generic methods to handle object specific to Chill
*/
abstract class AbstractChillVoter extends Voter implements ChillVoterInterface
{
}
abstract class AbstractChillVoter extends Voter implements ChillVoterInterface {}

View File

@@ -14,6 +14,4 @@ namespace Chill\MainBundle\Security\Authorization;
/**
* Provides methods for compiling voter and build admin role fields.
*/
interface ChillVoterInterface
{
}
interface ChillVoterInterface {}

View File

@@ -101,8 +101,7 @@ final readonly class CollateAddressWithReferenceOrPostalCode implements CollateA
public function __construct(
private Connection $connection,
private LoggerInterface $logger,
) {
}
) {}
/**
* @throws \Throwable

View File

@@ -22,8 +22,7 @@ final readonly class CollateAddressWithReferenceOrPostalCodeCronJob implements C
public function __construct(
private ClockInterface $clock,
private CollateAddressWithReferenceOrPostalCodeInterface $collateAddressWithReferenceOrPostalCode,
) {
}
) {}
public function canRun(?CronJobExecution $cronJobExecution): bool
{

View File

@@ -21,8 +21,7 @@ class ViewEntityInfoManager
*/
private iterable $vienEntityInfoProviders,
private Connection $connection,
) {
}
) {}
public function synchronizeOnDB(): void
{

View File

@@ -20,7 +20,5 @@ namespace Chill\MainBundle\Service\ShortMessage;
class NullShortMessageSender implements ShortMessageSenderInterface
{
public function send(ShortMessage $shortMessage): void
{
}
public function send(ShortMessage $shortMessage): void {}
}

View File

@@ -22,8 +22,7 @@ final readonly class FilterOrderGetActiveFilterHelper
private TranslatorInterface $translator,
private PropertyAccessorInterface $propertyAccessor,
private UserRender $userRender,
) {
}
) {}
/**
* Return all the data required to display the active filters

View File

@@ -54,8 +54,7 @@ final class FilterOrderHelper
public function __construct(
private readonly FormFactoryInterface $formFactory,
private readonly RequestStack $requestStack,
) {
}
) {}
public function addSingleCheckbox(string $name, string $label): self
{

View File

@@ -25,8 +25,7 @@ class Templating extends AbstractExtension
public function __construct(
private readonly RequestStack $requestStack,
private readonly FilterOrderGetActiveFilterHelper $filterOrderGetActiveFilterHelper,
) {
}
) {}
public function getFilters(): array
{

View File

@@ -36,9 +36,7 @@ final class TokenManagerTest extends KernelTestCase
$this->tokenManager = new TokenManager('secret', $logger);
}
public static function setUpBefore()
{
}
public static function setUpBefore() {}
public function testGenerate()
{

View File

@@ -13,6 +13,4 @@ namespace Chill\MainBundle\Workflow\Exception;
use RuntimeException;
class HandlerNotFoundException extends RuntimeException
{
}
class HandlerNotFoundException extends RuntimeException {}

View File

@@ -16,9 +16,7 @@ use Doctrine\Migrations\AbstractMigration;
class Version20100000000000 extends AbstractMigration
{
public function down(Schema $schema): void
{
}
public function down(Schema $schema): void {}
public function up(Schema $schema): void
{

View File

@@ -16,9 +16,7 @@ use Doctrine\Migrations\AbstractMigration;
final class Version20220513151853 extends AbstractMigration
{
public function down(Schema $schema): void
{
}
public function down(Schema $schema): void {}
public function getDescription(): string
{