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

Two blank docblock lines in model #1548

Open
nalatreb opened this issue May 17, 2024 · 1 comment
Open

Two blank docblock lines in model #1548

nalatreb opened this issue May 17, 2024 · 1 comment
Labels

Comments

@nalatreb
Copy link

Versions:

  • ide-helper Version: v3.0.0
  • PHP Version: 8.2

Question:

Hello!

In the latest version the class name was removed from the model generation with this commit 02af2a2.
I know it was not providing any useful information, but now the serializer generates two blank comment lines with extra space, which generate a phpcs warning in our project.
image

It is possible to change the serializer logic, if there are no short or long description in the docblock the serializer won't put an extra space? Here is the corresponding code: https://github.com/barryvdh/ReflectionDocBlock/blob/2.0.0/src/Barryvdh/Reflection/DocBlock/Serializer.php#L179
Maybe bring back the classname generation with an extra command option?

Or do you have any other suggestion? Or we just format the files after every ide helper generate?

Thanks for your help!

@mfn
Copy link
Collaborator

mfn commented May 17, 2024

Or we just format the files after every ide helper generate?

This is general the recommended way, to have something like rector/php-cs-fixer run after tools like ide-helper, etc.

I remember I looked into this particular one but due to the entanglement of the code, it wasn't as easy as I hoped, so I just stopped looking into it.

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

No branches or pull requests

2 participants