Suggest camelCase for variable naming

Created on 21 September 2023, 9 months ago

Problem/Motivation

* Drupal's coding standards are silent about variable case, so it is tempting to fall back to Symfony's coding standard, i.e. camelCase.
* However, many of Drupal's method signatures still use snake_case, so extending those methods forces a dev to use a mix of snake and camel.
* There are new PHP features which work better with camelCase, for example Constructor Property Promotion.

Steps to reproduce

Proposed resolution

* Suggest camelCase for variable names.
* Start showing a warning message for or a message of even lower priority for snake_case variables.

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

✨ Feature request
Status

Active

Version

8.3

Component

Coder Sniffer

Created by

🇨🇦Canada jigarius Montréal

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024