NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Switch - Case - Break Indentation


Joined: 29 Mar 2018
Posts: 46
Reply with quote
Hi,

Current alignment of a switch

Code:
switch($value) {
   case option;
       etc...
       break;
}


Requested alignment of a switch

Code:
switch($value) {
   case option;
       etc...
   break;
}


Thanks and kind regards,

jB Cool
View user's profileFind all posts by britescSend private message


Joined: 29 Mar 2018
Posts: 46
Reply with quote
Hi,

Thank you for your email.

I thought the words Current and Requested were clear enough, if not I apologise.

The code defined as Current shows how Re-Indent leaves the code of the Case / Break clause.

The code defined as Requested shows how many people consider the alternative syntax for the Case / Break clause.
I would like to see if possible an option in the configuration would allow this.

I appreciate that many, many programmers follow the Current method, in fact this is how it is displayed in the PHP Manual, as well as in C and C++, but also the Requested method can also be found in abundance.

For me as a partially sighted person having the break keyword act as a pseudo closing bracket is extremely helpful.

Thanks and kind regards,

jB Cool
View user's profileFind all posts by britescSend private message
Switch - Case - Break Indentation
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic