Skip to content

Commit badd078

Browse files
authored
Update ConfigEntityConfigExportRule.php
Additional check to make sure the 'config_export' annotation property is need.
1 parent 548fa7c commit badd078

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Rules/Deprecations/ConfigEntityConfigExportRule.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ protected function doProcessNode(ClassReflection $reflection, Node\Stmt\Class_ $
2121
$annotation = $reflection->getResolvedPhpDoc();
2222
// Plugins should always be annotated, but maybe this class is missing its
2323
// annotation since it swaps an existing one.
24-
if ($annotation === null) {
24+
if ($annotation === null || strpos('@ConfigEntityType(', $annotation->getPhpDocString()) === false) {
2525
return [];
2626
}
2727
$hasMatch = preg_match('/config_export\s?=\s?{/', $annotation->getPhpDocString());

0 commit comments

Comments
 (0)