$node->attrGroups
[] =
$this->phpAttributeGroupFactory->
createFromClassWithItems(Package::
class,
[$area]);
return $node;
} public function getRuleDefinition(): RuleDefinition
{ return new RuleDefinition( 'Adds a #[Package] attribute to all php classes corresponding to the area mapping.',
[ new CodeSample( // code before
'
class Foo{}',
// code after
'
#[Package(\'core\')]
class Foo{}'
),
] );
}