github lkrms/pretty-php v0.4.32

latest releases: v0.4.75, v0.4.74, v0.4.73...
13 months ago

Changed

  • In strict PSR-12 mode, add whitespace between exception delimiters in catch blocks
  • Always add a newline before the first object operator in a multi-line method chain (unless align-chains is enabled and strict PSR-12 mode is disabled)
  • Format for loop expressions as list items when align-lists is enabled
  • If an expression in a for loop breaks over multiple lines, add a newline after each comma-delimited expression, and a blank line between each semicolon-delimited expression
  • Suppress whitespace in empty for loop expressions

Fixed

  • Fix DNF type formatting

    Before:

    <?php
    class Foo
    {
        public(Countable & ArrayAccess)|MyClass|string|null $Bar;
    }

    After:

    <?php
    class Foo
    {
        public (Countable&ArrayAccess)|MyClass|string|null $Bar;
    }
  • Fix issue where parameter lists are not recognised as lists when they belong to an anonymous function that returns by reference

  • Fix align-lists issue where adjacent declaration and control structure bodies are aligned with the preceding list item

Don't miss a new pretty-php release

NewReleases is sending notifications on new releases.