Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No blank lines between properties #4969

Closed
JesusValera opened this issue May 24, 2020 · 1 comment
Closed

No blank lines between properties #4969

JesusValera opened this issue May 24, 2020 · 1 comment

Comments

@JesusValera
Copy link

For configuration or updating questions please read the README and UPGRADE documentation,
or visit: https://gitter.im/PHP-CS-Fixer

When reporting an issue (bug) please provide the following information:

The PHP version you are using ($ php -v):

=> 7.4

PHP CS Fixer version you are using ($ php-cs-fixer -V):

=> 2.16.3

The command you use to run PHP CS Fixer:

=> ./vendor/bin/php-cs-fixer fix

If applicable, please provide minimum samples of PHP code (as plain text, not screenshots):

  • before running PHP CS Fixer (no changes):
<?php
class Example
{
    public const FOO = 1;
    public static $bar = [1, 2, 3];
    private bool $baz = false;
    private $qux = [];
    private float $quux = 5.0;
}
  • with unexpected changes applied when running PHP CS Fixer:
<?php
class Example
{
    public const FOO = 1;

    public static $bar = [1, 2, 3];

    private bool $baz = false;

    private $qux = [];

    private float $quux = 5.0;
}
  • with the changes you expected instead:
<?php
class Example
{
    public const FOO = 1;
    public static $bar = [1, 2, 3];
    private bool $baz = false;
    private $qux = [];
    private float $quux = 5.0;
}

According to PSR-12 it shouldn't be spaces between each property. Isn't? 😄

Best,

@julienfalque
Copy link
Member

PHP CS Fixer doesn't have a PSR-12 ruleset yet (see #4502) but on v2.17, class_attributes_separation will allow what you want (#4875). Closing as there is nothing left to do here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants