Logical NOT operators (!
) should have leading and trailing whitespaces.
--- Original
+++ New
<?php
-if (!$bar) {
+if ( ! $bar) {
echo "Help!";
}
- Fixer class: PhpCsFixer\Fixer\Operator\NotOperatorWithSpaceFixer
- Test class: PhpCsFixer\Tests\Fixer\Operator\NotOperatorWithSpaceFixerTest
The test class defines officially supported behaviour. Each test case is a part of our backward compatibility promise.