1

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!

John Lobo
  • 14,355
  • 2
  • 10
  • 20
mstdmstd
  • 2,195
  • 17
  • 63
  • 140

1 Answers1

5

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

John Lobo
  • 14,355
  • 2
  • 10
  • 20