mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-05 02:40:50 +00:00
c079729bef
ad09d9c37e
make use of autotagInterface() (#5396)
21 lines
800 B
PHP
21 lines
800 B
PHP
<?php
|
|
|
|
declare (strict_types=1);
|
|
namespace Rector\Doctrine\CodeQuality;
|
|
|
|
use PHPStan\PhpDocParser\Ast\PhpDoc\PhpDocTagValueNode;
|
|
use PHPStan\PhpDocParser\Ast\Type\IdentifierTypeNode;
|
|
use Rector\BetterPhpDocParser\PhpDoc\DoctrineAnnotationTagValueNode;
|
|
use Rector\BetterPhpDocParser\PhpDoc\SpacelessPhpDocTagNode;
|
|
final class DocTagNodeFactory
|
|
{
|
|
/**
|
|
* @param PhpDocTagValueNode[] $arrayItemNodes
|
|
*/
|
|
public static function createSpacelessPhpDocTagNode(array $arrayItemNodes, string $className) : SpacelessPhpDocTagNode
|
|
{
|
|
$columDoctrineAnnotationTagValueNode = new DoctrineAnnotationTagValueNode(new IdentifierTypeNode('@\\' . $className), null, $arrayItemNodes);
|
|
return new SpacelessPhpDocTagNode('@\\' . $className, $columDoctrineAnnotationTagValueNode);
|
|
}
|
|
}
|