1: | <?php declare(strict_types=1); |
2: | |
3: | namespace Salient\PHPDoc\Tag; |
4: | |
5: | |
6: | |
7: | |
8: | class ReturnTag extends AbstractTag |
9: | { |
10: | |
11: | |
12: | |
13: | public function __construct( |
14: | string $type, |
15: | ?string $description = null, |
16: | ?string $class = null, |
17: | ?string $member = null, |
18: | ?string $static = null, |
19: | ?string $self = null, |
20: | array $aliases = [] |
21: | ) { |
22: | parent::__construct('return', null, $type, $description, $class, $member, $static, $self, $aliases); |
23: | } |
24: | |
25: | |
26: | |
27: | |
28: | public function getType(): string |
29: | { |
30: | return $this->Type; |
31: | } |
32: | |
33: | |
34: | |
35: | |
36: | public function __toString(): string |
37: | { |
38: | $string = "@{$this->Tag} {$this->Type}"; |
39: | if ($this->Description !== null) { |
40: | $string .= " {$this->Description}"; |
41: | } |
42: | return $string; |
43: | } |
44: | } |
45: | |