Drupal Coding Standards - s100

Rename function "" to match the regular expression ^[a-z][a-z0-9_]*$.

This error is not actually correct, the rules in the coding standards of drupal are that we follow the snake_case only in .module files or in drupal 7 context. In modern drupal (8+), in classes it should be camelCase instead.

Hello @borisson and welcome to community!

Thank you for raising awareness on this topic.
Indeed it seems that the convention changed since Drupal 8, as they mention in their documentation:

Drupal - PHP coding standards - Naming Conventions / Functions and Variables

Functions should be named using lowercase, and words should be separated with an underscore.

Drupal - PHP coding standards - Naming Conventions / Classes, Methods and Properties

  1. Methods and class properties should use lowerCamel naming. In Drupal 8, properties of configuration entities are exempt of these conventions. Those properties are allowed to use underscores.

I created a ticket to follow-up on this.

Thank you again for pointing this out.

Best regards,
Rudy