admin_webs Posted August 6, 2015 Share Posted August 6, 2015 I'm developing new huge module. And want to make it in new coding standard. I'm using codesniffer for psr 2. But have questions: 1) can I use camelCase for vars? 2) can I use braces for single if, else, elseif, for, while etc. Link to comment Share on other sites More sharing options...
admin_webs Posted August 7, 2015 Author Share Posted August 7, 2015 How you work now? Link to comment Share on other sites More sharing options...
admin_webs Posted August 10, 2015 Author Share Posted August 10, 2015 up Link to comment Share on other sites More sharing options...
admin_webs Posted August 13, 2015 Author Share Posted August 13, 2015 up Link to comment Share on other sites More sharing options...
mickeyboy1 Posted August 13, 2015 Share Posted August 13, 2015 This might help you http://doc.prestashop.com/display/PS16/Coding+Standards Link to comment Share on other sites More sharing options...
admin_webs Posted August 13, 2015 Author Share Posted August 13, 2015 I have read that link. But there not obviously. Yes they show if ($expr1) { // if body } elseif ($expr2) { // elseif body } else { // else body; } And psr 2 not allow inline structure. But prestashop have long history not use inline structure (for me is terrible but it was) But psr 2 allow use camelCase and snake_case. $foo->bar( $longArgument, $longerArgument, $muchLongerArgument ); And I'm not sure will new prestashop validator allow camelCase Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now