Skip to content
Snippets Groups Projects
Commit 403dccd2 authored by Klaus Purer's avatar Klaus Purer
Browse files

fix(ValidVariableNameSniff): Allow underscore class properties in classes that...

fix(ValidVariableNameSniff): Allow underscore class properties in classes that look like config entities (issue #2804739)
parent 315a3a09
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ class Drupal_Sniffs_NamingConventions_ValidVariableNameSniff
// their class property names. If a class extends something like
// ConfigEntityBase then we consider it a config entity class and allow
// underscores.
if ($extendsName !== false && strpos($extendsName, 'ConfigEntityBase') !== false) {
if ($extendsName !== false && strpos($extendsName, 'ConfigEntity') !== false) {
return;
}
}
......
......@@ -1298,6 +1298,20 @@ class ReactionRule extends ConfigEntityBase {
}
/**
* Underscores are allowed in properties of config entity classes.
*/
class NodeType extends ConfigEntityBundleBase {
/**
* Default value of the 'Create new revision' checkbox of this node type.
*
* @var bool
*/
protected $new_revision = TRUE;
}
/**
* Test class.
*/
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment