1 | <?php |
||
33 | class PhpParameter extends AbstractModel implements ValueInterface { |
||
34 | |||
35 | use NamePart; |
||
36 | use TypePart; |
||
37 | use ValuePart; |
||
38 | |||
39 | private $passedByReference = false; |
||
40 | |||
41 | /** |
||
42 | * Creates a new PHP parameter. |
||
43 | * |
||
44 | * @param string $name the parameter name |
||
45 | * @return static |
||
46 | */ |
||
47 | 18 | public static function create($name = null) { |
|
50 | |||
51 | /** |
||
52 | * Creates a new PHP parameter |
||
53 | * |
||
54 | * @param string $name the parameter name |
||
55 | */ |
||
56 | 30 | public function __construct($name = null) { |
|
60 | |||
61 | /** |
||
62 | * Sets whether this parameter is passed by reference |
||
63 | * |
||
64 | * @param bool $bool `true` if passed by reference and `false` if not |
||
65 | * @return $this |
||
66 | */ |
||
67 | 9 | public function setPassedByReference(bool $bool) { |
|
72 | |||
73 | /** |
||
74 | * Returns whether this parameter is passed by reference |
||
75 | * |
||
76 | * @return bool `true` if passed by reference and `false` if not |
||
77 | */ |
||
78 | 12 | public function isPassedByReference(): bool { |
|
81 | |||
82 | /** |
||
83 | * Returns a docblock tag for this parameter |
||
84 | * |
||
85 | * @return ParamTag |
||
86 | */ |
||
87 | 7 | public function getDocblockTag(): ParamTag { |
|
103 | |||
104 | /** |
||
105 | * Alias for setDescription() |
||
106 | * |
||
107 | * @see #setDescription |
||
108 | * @param string $description |
||
109 | * @return $this |
||
110 | */ |
||
111 | 5 | public function setTypeDescription(?string $description) { |
|
114 | |||
115 | /** |
||
116 | * Alias for getDescription() |
||
117 | * |
||
118 | * @see #getDescription |
||
119 | * @return string |
||
120 | */ |
||
121 | 9 | public function getTypeDescription(): ?string { |
|
124 | } |
||
125 |