Welcome Guest, Not a member yet? Register   Sign In
A question about the future coding style guide
#22

PSR is very helpful in case you have multiple developers working on the project, and with everyone having their own style, you can pull in impartial styling guide without anyone getting upset as rules are not personal to lets say "your boss", and everyone have to change a little bit, instead of completely change their way.

(01-04-2016, 11:30 PM)jlp Wrote: There is nothing to prevent you from following PSR2 or PSR37 inside your application, if that makes it easier for you to work with Smile

There is one corner case I can think of right now - controller methods. PSR expects camel case, and CI3 converts methods from dashes to underscores.

I have not checked CI code, but maybe this should either auto-detect if URL my-method-name is my_method_name or myMethodName or it could be explicitly set in config what naming convention devs use in controllers.
Reply


Messages In This Thread
RE: A question about the future coding style guide - by Pertti - 03-17-2016, 03:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB