Rule elseif The keyword elseif should be used instead of else if so that all control keywords look like single words. Examples Example #1 --- Original +++ New <?php if ($a) { -} else if ($b) { +} elseif ($b) { } Rule sets The rule is part of the following rule sets: @PER @PER-CS @PER-CS1.0 @PER-CS2.0 @PSR2 @PSR12 @PhpCsFixer @Symfony Source class PhpCsFixer\Fixer\ControlStructure\ElseifFixer