Skip to content

[Question] Possible to ignore only one speciifc PSR12 rule? #3453

Closed
PHPCSStandards/PHP_CodeSniffer
#35
@Gabb1995

Description

@Gabb1995

Running phpcbf for PSR12 I get:

<?php

declare(strict_types=1);

namespace App\Services;

use App\Entity\User;
use App\Entity\Car;

use function Service\api;

Which is correct by PSR12 Standard, unfortunately PHP-CS-FIXER do not fully support this yet and when I run both phpcbf and php-cs-fixer, php-cs-fixer is removing the blank line between the imports, and phpcbf is readding causing an issue.

Is it possible to ignore this specific rule (no blank lines between grouped imports)?
I checked from php-cs-fixer side but it would mean removing the no_extra_blank_lines fixer which would affect more than just this. Any help would be appreciated.

Related issue on php-cs-fixer: PHP-CS-Fixer/PHP-CS-Fixer#3582

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions