Jump to content

PrestaShop Coding Style


Recommended Posts

Does anyone else hate the coding style PrestaShop uses as much as I do? Seems like they flip a coin to decide whether or not to use brackets in any given section of code!

 

I personally prefer Allman style but PEAR style would be good enough. Makes me wonder if they are intentionally trying to make their code hard to read!

Link to comment
Share on other sites

if one doesn't need brackets for simple if/else...then why bother...plus I broke my English keyboard in Spain and have not found a way to get a bracket with my Spanish keyboard...I can see the brackets on the keyboard but no idea how to make them work..so I have to copy and paste them as I go. so I say down with brackets!!!!!

 

I prefer 360-90 assembler language...never used brackets...plus per trace...adstop...and super fast

Edited by elpatron (see edit history)
Link to comment
Share on other sites

You would bother because of consistency, organization, and to code to a style that the majority of PHP coders use. The style that prestashop uses makes it incredibly hard to read for many coders. Plus, prestashop uses this syntax for all control sctructures not just a simple if/else. All of the large open source packages I have worked on have always picked a coding standard like PEAR to follow. I am sure there are some out there but I have never seen a open source project as popular as prestahop that doesn't do this.

Edited by tomdchi (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...