Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • D digitec-wiki
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • Digitec
  • digitec-wiki
  • Wiki
  • php coding standards

php coding standards · Changes

Page history
mmclin: update naming conventions authored Mar 25, 2014 by Rene Cabral's avatar Rene Cabral
Show whitespace changes
Inline Side-by-side
php-coding-standards.markdown
View page @ 25ffceac
...@@ -103,23 +103,26 @@ class FooBar implements MySimpleInterface { ...@@ -103,23 +103,26 @@ class FooBar implements MySimpleInterface {
### Naming Conventions ### Naming Conventions
* Use camelCase, not underscores, for variable, arguments, function and method names; * Use camelCase, not underscores, for variable, function and method names, arguments;
* Use underscores for array keys, option names and parameter names;
* Use lower underscores for array keys, option names and parameter names;
* Use namespaces for all classes; * Use namespaces for all classes;
* Prefix abstract classes with Abstract.
* Suffix interfaces with Interface;
* Suffix traits with Trait;
* Suffix exceptions with Exception;
* Use alphanumeric characters and underscores for file names;
* Prefix abstract classes with Abstract;
* Suffix interfaces with Interface;
* Suffix traits with Trait; #### Service Naming Conventions
* Suffix exceptions with Exception; * A service name contains groups, separated by dots;
* The DI alias of the bundle is the first group (e.g. fos_user);
* Use lowercase letters for service and parameter names;
* A group name uses the underscore notation;
* Each service has a corresponding parameter containing the class name, following the SERVICE NAME.class convention.
* Use alphanumeric characters and underscores for file names;
* Don't forget to look at the more verbose Conventions document for more subjective naming considerations.
### Documentation ### Documentation
......
Clone repository
  • alpha beta testing
  • browser testing
  • camtasia licenses
  • code delivery processes
  • coding practices
  • css and sass coding standards
  • database schema standards
  • dependency management
  • development environments
  • digitec agile process
  • digitec gitlab styles
  • digitec software promises
  • digitec spec process
  • gitlab administration
  • gitlab issues tags
View All Pages