Allow single line on empty function body

This commit is contained in:
2024-10-11 11:27:04 +02:00
parent 05afe727ee
commit 6e95ac42c9
19 changed files with 19 additions and 40 deletions
+1
View File
@@ -8,6 +8,7 @@ return (new PhpCsFixer\Config())
->setRules([
'@Symfony' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'single_line_empty_body' => true,
'yoda_style' => [
'equal' => false,
'identical' => false,
+1 -3
View File
@@ -17,9 +17,7 @@ use App\State\GatewayStateProvider;
#[API\Get(provider: GatewayStateProvider::class)]
class Gateway
{
public function __construct(private readonly GatewayInterface $gateway)
{
}
public function __construct(private readonly GatewayInterface $gateway) {}
#[API\ApiProperty(identifier: true)]
public function getName(): string
+1 -2
View File
@@ -24,8 +24,7 @@ class Version
public function __construct(
private readonly LogEntry $log,
private readonly object $entity,
) {
}
) {}
/**
* The ID of the version record.
+1 -3
View File
@@ -21,9 +21,7 @@ class SystemVarsListCommand extends Command
parent::__construct();
}
protected function configure(): void
{
}
protected function configure(): void {}
protected function execute(InputInterface $input, OutputInterface $output): int
{
+1 -2
View File
@@ -19,8 +19,7 @@ class GatewaysController extends AbstractController
public function __construct(
private GatewayLocator $gatewayLocator,
) {
}
) {}
#[Route('/gateway_redirects', name: self::REDIRECT)]
public function handleRedirect(Request $request): Response
@@ -15,8 +15,7 @@ final class SystemVariablesLoader implements EnvVarLoaderInterface
{
public function __construct(
private SystemVariableRepository $systemVarRepository,
) {
}
) {}
public function loadEnvVars(): array
{
+1 -2
View File
@@ -76,8 +76,7 @@ class CheckoutsPump extends AbstractPump implements PumpInterface
private TipjarRepository $tipjarRepository,
private EntityManagerInterface $entityManager,
private GatewayCheckoutService $checkoutService,
) {
}
) {}
public function supports(mixed $batch): bool
{
+1 -2
View File
@@ -97,8 +97,7 @@ class ProjectsPump extends AbstractPump implements PumpInterface
public function __construct(
private UserRepository $userRepository,
private EntityManagerInterface $entityManager,
) {
}
) {}
public function supports(mixed $batch): bool
{
+1 -2
View File
@@ -52,8 +52,7 @@ class UsersPump extends AbstractPump implements PumpInterface
public function __construct(
private EntityManagerInterface $entityManager,
) {
}
) {}
public function supports(mixed $batch): bool
{
@@ -49,8 +49,7 @@ class PaypalGateway implements GatewayInterface
private IriConverterInterface $iriConverter,
private GatewayCheckoutService $checkoutService,
private GatewayCheckoutRepository $checkoutRepository,
) {
}
) {}
public static function getName(): string
{
+1 -3
View File
@@ -12,9 +12,7 @@ use ApiPlatform\OpenApi\OpenApi;
class OpenApiFactory implements OpenApiFactoryInterface
{
public function __construct(private OpenApiFactoryInterface $decorated)
{
}
public function __construct(private OpenApiFactoryInterface $decorated) {}
private function updateOperation(Operation $operation): Operation
{
+1 -3
View File
@@ -9,9 +9,7 @@ use Symfony\Component\Security\Http\Authenticator\Passport\Badge\UserBadge;
class AccessTokenHandler implements AccessTokenHandlerInterface
{
public function __construct(private UserTokenRepository $userTokenRepository)
{
}
public function __construct(private UserTokenRepository $userTokenRepository) {}
public function getUserBadgeFrom(#[\SensitiveParameter] string $accessToken): UserBadge
{
+1 -2
View File
@@ -13,8 +13,7 @@ class AuthService
public function __construct(
private string $appSecret,
) {
}
) {}
/**
* @return array{CORS_ALLOW_ORIGIN: string, SESSION_LIFETIME: int}
+1 -2
View File
@@ -16,8 +16,7 @@ class GatewayCheckoutService
public function __construct(
private RouterInterface $router,
) {
}
) {}
/**
* Generates a suitable value for redirection params to external gateways.
+1 -2
View File
@@ -16,8 +16,7 @@ class GatewayCheckoutProcessor implements ProcessorInterface
private ProcessorInterface $innerProcessor,
private GatewayLocator $gatewayLocator,
private EntityManagerInterface $entityManager,
) {
}
) {}
/**
* @param GatewayCheckout $data
+1 -2
View File
@@ -13,8 +13,7 @@ class GatewayStateProvider implements ProviderInterface
{
public function __construct(
private GatewayLocator $gateways,
) {
}
) {}
private function getGateways(): array
{
+1 -2
View File
@@ -14,8 +14,7 @@ class UserStateProcessor implements ProcessorInterface
public function __construct(
private ProcessorInterface $innerProcessor,
private UserPasswordHasherInterface $userPasswordHasher,
) {
}
) {}
/**
* @return T2
+1 -2
View File
@@ -21,8 +21,7 @@ class UserTokenLoginProcessor implements ProcessorInterface
private UserRepository $userRepository,
private EntityManagerInterface $entityManager,
private UserPasswordHasherInterface $userPasswordHasher,
) {
}
) {}
/**
* @param UserTokenLoginDto $data
+1 -2
View File
@@ -11,8 +11,7 @@ class GatewayNameValidator extends ChoiceValidator
{
public function __construct(
private GatewayLocator $gateways,
) {
}
) {}
public function validate($value, Constraint $constraint): void
{