1 | <?php |
||
32 | class PhpParameter extends AbstractModel implements ValueInterface { |
||
33 | |||
34 | use NamePart; |
||
35 | use TypePart; |
||
36 | use ValuePart; |
||
37 | |||
38 | private $passedByReference = false; |
||
39 | |||
40 | /** |
||
41 | * Creates a new PHP parameter. |
||
42 | * |
||
43 | * @param string $name the parameter name |
||
44 | * @return static |
||
45 | */ |
||
46 | 18 | public static function create($name = null) { |
|
49 | |||
50 | /** |
||
51 | * Creates a new PHP parameter |
||
52 | * |
||
53 | * @param string $name the parameter name |
||
54 | */ |
||
55 | 29 | public function __construct($name = null) { |
|
58 | |||
59 | /** |
||
60 | * Sets whether this parameter is passed by reference |
||
61 | * |
||
62 | * @param bool $bool `true` if passed by reference and `false` if not |
||
63 | * @return $this |
||
64 | */ |
||
65 | 8 | public function setPassedByReference(bool $bool) { |
|
70 | |||
71 | /** |
||
72 | * Returns whether this parameter is passed by reference |
||
73 | * |
||
74 | * @return bool `true` if passed by reference and `false` if not |
||
75 | */ |
||
76 | 12 | public function isPassedByReference(): bool { |
|
79 | |||
80 | /** |
||
81 | * Returns a docblock tag for this parameter |
||
82 | * |
||
83 | * @return ParamTag |
||
84 | */ |
||
85 | 7 | public function getDocblockTag(): ParamTag { |
|
91 | |||
92 | /** |
||
93 | * Alias for setDescription() |
||
94 | * |
||
95 | * @see #setDescription |
||
96 | * @param string $description |
||
97 | * @return $this |
||
98 | */ |
||
99 | 4 | public function setTypeDescription(?string $description) { |
|
102 | |||
103 | /** |
||
104 | * Alias for getDescription() |
||
105 | * |
||
106 | * @see #getDescription |
||
107 | * @return string |
||
108 | */ |
||
109 | 9 | public function getTypeDescription(): ?string { |
|
112 | } |
||
113 |