Here is a sample code that, when formatted with default settings, does not change in any way.
<?php
// case 1
if (true) {return;}
// case 2
if (true) {return;
}
// case 3
if (true) {
return;}
I believe that for case 1 this is OK.
And for cases 2 and 3 the result should be like this?
<?php
// case 2, 3
if (true) {
return;
}