| 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: | public string $name; |
| 15: | |
| 16: | |
| 17: | public array $arguments; |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | public function __construct(string $name, array $arguments) |
| 23: | { |
| 24: | $this->name = $name; |
| 25: | $this->arguments = $arguments; |
| 26: | } |
| 27: | |
| 28: | public function __toString(): string |
| 29: | { |
| 30: | $arguments = implode(', ', $this->arguments); |
| 31: | return $this->name . '(' . $arguments . ')'; |
| 32: | } |
| 33: | |
| 34: | } |
| 35: | |