Welcome Guest, Not a member yet? Register   Sign In
Restructuring/code clean up
#3

If I created a module and consider it finished (feature wise working order) I start refactoring it, moving code from controller to models to make more sense and document every method.

You can setup your editor to use PHP_CodeSniffer. This could help you to force you to code (php) following a certain style guide. Most editors support this (Sublime, Atom, Php storm) to auto format your code on file save for example or with a shortkey.

You can use PSR-2, the CodeIgniter style guide or your personal preference. The most important thing is readability.

Same applies for html/css, just indent every new element the same way.
Reply


Messages In This Thread
Restructuring/code clean up - by ignitedcms - 02-05-2017, 03:19 PM
RE: Restructuring/code clean up - by ignitedcms - 02-07-2017, 12:29 AM
RE: Restructuring/code clean up - by Diederik - 02-07-2017, 06:00 AM
RE: Restructuring/code clean up - by Diederik - 02-07-2017, 03:57 PM
RE: Restructuring/code clean up - by ignitedcms - 02-07-2017, 06:24 AM



Theme © iAndrew 2016 - Forum software by © MyBB