2022-08-24 11:51:48 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare (strict_types=1);
|
|
|
|
namespace Rector\Php80\AttributeDecorator;
|
|
|
|
|
|
|
|
use PhpParser\Node\Attribute;
|
2024-02-17 10:59:16 +00:00
|
|
|
use Rector\Php80\Contract\ConverterAttributeDecoratorInterface;
|
|
|
|
final class SensioParamConverterAttributeDecorator implements ConverterAttributeDecoratorInterface
|
2022-08-24 11:51:48 +00:00
|
|
|
{
|
|
|
|
public function getAttributeName() : string
|
|
|
|
{
|
|
|
|
return 'Sensio\\Bundle\\FrameworkExtraBundle\\Configuration\\ParamConverter';
|
|
|
|
}
|
|
|
|
public function decorate(Attribute $attribute) : void
|
|
|
|
{
|
|
|
|
// make first named arg silent, @see https://github.com/rectorphp/rector/issues/7352
|
|
|
|
$firstArg = $attribute->args[0];
|
|
|
|
$firstArg->name = null;
|
|
|
|
}
|
|
|
|
}
|