Skip to content

Coding Style

bakaneko edited this page Dec 6, 2022 · 6 revisions

PHP

  • whatever phpcs says

Naming Case

The list is incomplete and may be wrong.

  • translation file (filename, key): snake_case
  • blade filename: snake_case
  • less css: kebab-case
  • javascript:
    • class: PascalCase
    • function: camelCase
    • filename: kebab-case
  • php:
    • class: PascalCase
    • function inside class: camelCase
    • helper function: snake_case
    • variable: camelCase
    • laravel model relation: camelCase
  • json:
    • key: snake_case
    • include: snake_case
    • include function: PascalCase (so it's includePascalCase)
Clone this wiki locally