Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can no longer use phpdoc multine in constructor with since 2.32.3 #205

Open
tyx opened this issue Oct 10, 2023 · 2 comments
Open

Can no longer use phpdoc multine in constructor with since 2.32.3 #205

tyx opened this issue Oct 10, 2023 · 2 comments

Comments

@tyx
Copy link

tyx commented Oct 10, 2023

We use this kind of config :

'PedroTroller/line_break_between_method_arguments' => ['max-args' => false, 'max-length' => 120, 'automatic-argument-merge' => false, 'inline-attributes' => false],

Ans since latest release, it want to move inline all our phpdoc

      ---------- begin diff ----------
--- /var/task/src/Operation/Reception/Domain/ReadModel/GuestInformation.php
+++ /var/task/src/Operation/Reception/Domain/ReadModel/GuestInformation.php
@@ -9,8 +9,7 @@
         public int $nbAdults,
         public int $nbChildren,
         public int $nbBabies,
-        /** @var array<AdditionalGuest> $additionalGuests */ 
-        public array $additionalGuests = [],
+        /** @var array<AdditionalGuest> $additionalGuests */ public array $additionalGuests = [],
     ) {}
 
     public function totalBillableGuests(): int

      ----------- end diff -----------

I have no value for method_argument_space and I failed to have back the old behavior. Anyone can help ?

@tyx tyx changed the title Can no longer use phpdoc multine in constructor with since 2.33 Can no longer use phpdoc multine in constructor with since 2.32.3 Oct 10, 2023
@ostrolucky
Copy link
Contributor

Workaround I found is to use @param above method instead

      ---------- begin diff ----------
--- /var/task/src/Operation/Reception/Domain/ReadModel/GuestInformation.php
+++ /var/task/src/Operation/Reception/Domain/ReadModel/GuestInformation.php
@@ -9,8 +9,7 @@
+      /** @param array<AdditionalGuest> $additionalGuests */ 
         public function __construct(
         public int $nbChildren,
         public int $nbBabies,
-        /** @var array<AdditionalGuest> $additionalGuests */ 
        public array $additionalGuests = [],
     ) {}

then fixer will not touch it

@tyx
Copy link
Author

tyx commented Nov 20, 2023

thanks for your help, I will give a try !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants