rector/rules/Php80/AttributeDecorator/SensioParamConverterAttributeDecorator.php
Tomas Votruba 476bd88e73 Updated Rector to commit a533e70fca40571ab9504fbb857205b2be2eccb6
a533e70fca [Php80] Add DoctrineCoverterterAttributeDecorator to convert "false"/"true" string to false/true on nullable arg on Doctrine\ORM\Mapping\Column (#5629)
2024-02-17 10:59:16 +00:00

21 lines
656 B
PHP

<?php
declare (strict_types=1);
namespace Rector\Php80\AttributeDecorator;
use PhpParser\Node\Attribute;
use Rector\Php80\Contract\ConverterAttributeDecoratorInterface;
final class SensioParamConverterAttributeDecorator implements ConverterAttributeDecoratorInterface
{
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;
}
}