Skip to content

Blink: read the options of PhpdocAlign - #290

Open
GErpeldinger wants to merge 2 commits into
ecsphp:mainfrom
GErpeldinger:blink-phpdoc-align
Open

GErpeldinger wants to merge 2 commits into
ecsphp:mainfrom
GErpeldinger:blink-phpdoc-align

Conversation

@GErpeldinger

Copy link
Copy Markdown
Contributor

PhpdocAlign had one fixed style, whatever the config said: left alignment with spacing 2 for @param. On a project with the default config, that reported nearly every file with a docblock.

It now reads align, spacing and tags, and without options it behaves like PHP-CS-Fixer: vertical, spacing 1. The laravel set is not affected, because it sets its options.

The first commit adds the tests, with expected output from the PHP engine and a stub so they compile, so CI shows them failing. The fix follows as a second commit.

🤖 Generated with Claude Code

@GErpeldinger

Copy link
Copy Markdown
Contributor Author

CI here waits for a maintainer's approval, so I ran it on my fork. With the test commit alone, Blink Tests fails on Linux and Windows: https://github.com/GErpeldinger/ecs-src/actions/runs/41890783792. The fix is now pushed.

The expected output of the table comes from the PHP engine. WithConfig is a stub so the
tests compile and fail on the output. The fix follows.
PhpdocAlign had one fixed style, left alignment with spacing 2 for @PARAM, whatever the
config said. Read align, spacing and tags and port fixDocBlock for both alignments.
Without options the rule now behaves like PHP-CS-Fixer's default, vertical with spacing
1: the dumper sends no options when they are the defaults, and the laravel set sets its
own.
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

Successfully merging this pull request may close these issues.

1 participant