1: <?php declare(strict_types = 1);
2:
3: namespace PHPStan\PhpDocParser\Ast\PhpDoc\Doctrine;
4:
5: use PHPStan\PhpDocParser\Ast\Node;
6: use PHPStan\PhpDocParser\Ast\NodeAttributes;
7: use function implode;
8:
9: class DoctrineAnnotation implements Node
10: {
11:
12: use NodeAttributes;
13:
14: /** @var string */
15: public $name;
16:
17: /** @var list<DoctrineArgument> */
18: public $arguments;
19:
20: /**
21: * @param list<DoctrineArgument> $arguments
22: */
23: public function __construct(string $name, array $arguments)
24: {
25: $this->name = $name;
26: $this->arguments = $arguments;
27: }
28:
29: public function __toString(): string
30: {
31: $arguments = implode(', ', $this->arguments);
32: return $this->name . '(' . $arguments . ')';
33: }
34:
35: }
36: