Skip to main content

Project Coding guidelines

Basic coding style used in the system will be PSR-2

Do's

  1. Create reusable function in Model with error handling returns.
  2. Follow GIT always.
  3. Git commit should follow standard best practices.
  4. Always use i18n in All Applications.
  5. All the methods and actions must be prefixed by comment description.
  6. While creating Database always use innodb engine, charset as utf8mb4 and collation as unicode_ci.
  7. Database fields/variables should be snake_case , method should be camelCase and class name should be StudlyCase.
  8. In Database all the master table should be prefixed with core*<table_name>.
  9. Use SecurityHelper , UploadHelper and StatusHelper Class for Security hash, Uploading files and Status Options respectively.
  10. Always Export Financial Data in Quotes("") to avoid change of data(Number Format Scientific) in Excel.

Dont's

  1. Do not write any SQL Query directly in View.
  2. Do not write long actions in controllers - break down long code in multiple reusable function.