@@ -14,16 +14,15 @@ editor, so results are consistent.
1414| ` phpantom_lsp init ` | Generate a default ` .phpantom.toml ` config file |
1515
1616Running with no subcommand starts the language server. Editors launch
17- this automatically; you never need to run it by hand .
17+ this automatically.
1818
1919---
2020
21- ## ` analyze ` — Batch diagnostics
21+ ## ` analyze `
2222
23- Scans PHP files and reports PHPantom's own diagnostics (no PHPStan, no
24- external tools) in a PHPStan-style table format. Use it to find spots
25- where the LSP cannot resolve a symbol, so you can achieve full
26- completion coverage.
23+ Scans PHP files and reports PHPantom diagnostics in a PHPStan-style
24+ table format. Use it to find spots where the LSP cannot resolve a
25+ symbol, so you can achieve full completion coverage.
2726
2827``` sh
2928phpantom_lsp analyze # scan entire project
@@ -83,11 +82,10 @@ Each has a rule identifier shown below the message.
8382
8483---
8584
86- ## ` fix ` — Automated code fixes
85+ ## ` fix `
8786
88- Applies code fixes across the project, modeled after
89- [ php-cs-fixer] ( https://github.com/PHP-CS-Fixer/PHP-CS-Fixer ) . Specify
90- which rules to run, or omit ` --rule ` to run all preferred native fixers.
87+ Applies code fixes across the project. Specify which rules to run, or
88+ omit ` --rule ` to run all preferred native fixers.
9189
9290``` sh
9391phpantom_lsp fix # apply all preferred fixers
@@ -106,7 +104,7 @@ phpantom_lsp fix --project-root /path/to/app # explicit project root
106104| ` [PATH] ` | File or directory to fix. Defaults to the entire project. |
107105| ` --rule <RULE> ` | Rule to apply (repeatable). Omit to run all preferred native rules. |
108106| ` --dry-run ` | Report what would change without writing files. |
109- | ` --with-phpstan ` | Enable PHPStan-based fixers (runs PHPStan to collect diagnostics). |
107+ | ` --with-phpstan ` | Enable PHPStan-based fixers (future feature). |
110108| ` --project-root <DIR> ` | Project root directory. Defaults to the current working directory. |
111109| ` --no-colour ` | Disable ANSI colour output. |
112110
@@ -120,28 +118,11 @@ phpantom_lsp fix --project-root /path/to/app # explicit project root
120118
121119### Available rules
122120
123- Rules correspond to diagnostic identifiers. Native rules run without
124- external tools. PHPStan rules require ` --with-phpstan ` and are prefixed
125- with ` phpstan. ` .
121+ Rules correspond to diagnostic identifiers.
126122
127- ** Native rules (shipped):**
128-
129- | Rule | Description |
130- | ------------------ | --------------------------------------------------------- |
131- | ` unused_import ` | Remove unused ` use ` statements. Handles simple imports, group imports (removes individual members), and collapses leftover blank lines. |
132-
133- ** PHPStan rules (planned, requires ` --with-phpstan ` ):**
134-
135- These are not yet implemented. See the [ fix CLI roadmap] ( todo/fix-cli.md )
136- for details.
137-
138- | Rule | Description |
139- | -------------------------------------------- | --------------------------------------------------- |
140- | ` phpstan.return.unusedType ` | Remove unused type from a return union |
141- | ` phpstan.missingType.iterableValue ` | Add ` @return array<mixed> ` for untyped iterables |
142- | ` phpstan.property.unused ` | Remove unused property declarations |
143- | ` phpstan.method.unused ` | Remove unused method declarations |
144- | ` phpstan.generics.callSiteVarianceRedundant ` | Remove redundant variance annotations in docblocks |
123+ | Rule | Description |
124+ | ------------------ | ------------------------------ |
125+ | ` unused_import ` | Remove unused ` use ` statements |
145126
146127### Example output
147128
@@ -179,7 +160,7 @@ Use `--dry-run` in CI to enforce that imports stay clean:
179160
180161``` sh
181162phpantom_lsp fix --dry-run --rule unused_import --project-root .
182- # Exit code 2 means fixable issues exist → fail the build.
163+ # Exit code 2 means fixable issues exist. Fail the build.
183164```
184165
185166### Idempotency
@@ -190,7 +171,7 @@ writes nothing.
190171
191172---
192173
193- ## ` init ` — Generate config file
174+ ## ` init `
194175
195176Creates a default ` .phpantom.toml ` in the current directory with all
196177options documented and commented out. Safe to run if the file already
0 commit comments