Page tree

Versions Compared

Key

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

PSR-12: Extended Coding Style

  • Namespaces and classes MUST follow an “autoloading” PSR-0, PSR-4
  • Class names MUST be declared in StudlyCaps/PascalCase
  • CONSTANTS MUST be declared in all upper case with underscore separators
  • Method names MUST be declared in camelCase
  • Variable names MUST be written in camelCase and the name describe for what it is ($item = $termEntryTig)

...

  • UTF-8
  • Next file line delimiter: Unix
  • Tabs: 4 Spaces

Link to PSR-12 article: https://www.php-fig.org/psr/psr-12/

Principles:

  • YAGNI: You ain’t gonna need it (wiki)
  • KISS: Keep It Simple, Stupid (wiki)
  • DRY: Don’t Repeat Yourself (wiki)
  • SOLID: (wiki)
    - Single-Responsibility-Prinzip
    - Open-Closed-Prinzip
    - Liskovsches Substitutionsprinzip
    - Interface-Segregation-Prinzip
    - Dependency-Inversion-Prinzip