Child pages
  • Coding Standards

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Object name must be singular.

    Code Block
    borderStylesolid
    class Customer
    
  2. Class name must follow the CamelCase practice, except that the first letter is uppercase.

    Code Block
    borderStylesolid
    class MyBeautifulClass
    

...

Constants

  1. Define Constant names must be written in uppercase, except for "true", "false" and "null" which must be lowercase: ENT_NOQUOTE, true.
  2. Define Constant names have to be prefixed with "PS_" inside the core and module.

    Code Block
    borderStylesolid
    define('PS_DEBUG', 1);
    define('PS_MODULE_NAME_DEBUG', 1);
    
  3. Define Constant names should only use alphabetical characters and "_".

...

All keywords have to be lowercase: as, case, if, echo, null.

Constants

Constants must be uppercase, except for "true", "false" and "null" which must be lowercase: ENT_NOQUOTE, true.

Configuration variables

Configuration variables follow the same rules as defined above.

...