Added
- Detect indentation of input files for more accurate tab expansion
Changed
-
Improve CLI option validation and error messages
-
Treat
case
statements in enumerations as declarations for more consistent vertical whitespace and DocBlock handling -
Always collapse one-line DocBlocks before
global
andstatic
variable declarations -
Collapse and ignore one-line DocBlocks with a PHPDoc tag when applying vertical whitespace to consecutive one-line declarations
Before (DocBlock triggers vertical expansion):
<?php class Foo { public int $Bar; public string $Qux; /** * @var string[] */ public array $Quux = []; }
After (DocBlock is collapsed if there are no blank lines between property declarations):
<?php class Foo { public int $Bar; public string $Qux; /** @var string[] */ public array $Quux = []; }
-
Improve DocBlock normalisation when leading asterisks are missing
Input:
<?php /** * Comment * @api */ /* * List: * Item 1 * Item 2 */
Previous output:
<?php /** * * Comment * * * @api */ /* * List: * Item 1 * Item 2 */
Current output:
<?php /** * Comment * * @api */ /* * List: * * Item 1 * * Item 2 */
Fixed
- Fix issue where braces with a nested
match
expression may be incorrectly parsed as a complete statement