Skip to content

Don't print trailing spaces on empty DocBlock lines #1669

Open
@kohenkatz

Description

@kohenkatz

Summary

The ide-helper:models command modifies the DocBlock of the models in the application.

It looks like this happens by reading the entire comment and rebuilding it, which makes sense.

The problem is that this process adds extra space to blank lines in the comment.

Example:

/**
 * This model does something interesting.
 *
 * It is an example of a model with lots of documentation
 */
class MyModel extends Model
{}

After the ide-helper:models command is run (here using -M to simplify the output), the following is produced:

/**
 * This model does something interesting.
 * <-- THIS LINE HAS EXTRA TRAILING SPACE
 * It is an example of a model with lots of documentation
 *
 * @mixin IdeHelperMyModel
 */
class MyModel extends Model
{}

This requires a second step (manual or automated) of removing all these trailing spaces again.

Would it be possible for this tool to not write those spaces in the first place?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions