Home > OS >  How with pint can I remove space after negative “!” symbol?
How with pint can I remove space after negative “!” symbol?

Time:02-02

How with laravel/pint 1.4 can I remove space after negative “!” symbol ?

Not :

if (! self::$wasSetup) {

But :

if (!self::$wasSetup) {

I suppose that last is psr-12 rule...

Thanks!

CodePudding user response:

As per PHP-CS-Fixer , Rule not_operator_with_successor_space

Logical NOT operators (!) should have one trailing whitespace.

So by default, one trailing whitespace is enabled. To disable white space after NOT operators then you should create a pint.json file in the root folder

{
    "preset": "laravel",
    "rules": {
        "not_operator_with_successor_space": false
    }
}

enter image description here

  • Related