Fork me on GitHub
a Sensio Labs Product

I ate three cookies πŸͺ (v3.40.2) edition

Rule not_operator_with_spaceΒΆ

Logical NOT operators (!) should have leading and trailing whitespaces.

ExamplesΒΆ

Example #1ΒΆ

--- Original
+++ New
 <?php

-if (!$bar) {
+if ( ! $bar) {
     echo "Help!";
 }

Source classΒΆ

PhpCsFixer\Fixer\Operator\NotOperatorWithSpaceFixer