4.2.1. Add Brackets To Single Instructions

This cobbler adds curly brackets to single expression, with for(), foreach(), while(); and do…while() instructions.

No brackets are added to instructions that are already bracketed.

4.2.1.1. Before

<?php

if ($a)
     $b = 1;
else {
     $c = ;2
}

?>

4.2.1.2. After

<?php

if ($a) {
     $b = 1;
} else {
     $c = ;2
}

?>

4.2.1.3. Reverse Cobbler

  • No anchor for Structures/RemoveBracketsAroundSingleInstruction.ini

4.2.1.4. Specs

Short Name

Structures/AddBracketsToSingleInstructions

Exakat version

2.4.6

Available in

Entreprise Edition, Exakat Cloud