1 | <?php |
||
4 | trait ValueTrait { |
||
5 | |||
6 | private $value; |
||
7 | |||
8 | private $hasValue = false; |
||
9 | |||
10 | private $expression; |
||
11 | |||
12 | private $hasExpression = false; |
||
13 | |||
14 | /** |
||
15 | * @param string $value |
||
16 | * @deprecated use `setValue()` instead |
||
17 | * @return static |
||
18 | */ |
||
19 | public function setDefaultValue($value) { |
||
22 | |||
23 | /** |
||
24 | * @deprecated use `unsetValue()` instead |
||
25 | */ |
||
26 | public function unsetDefaultValue() { |
||
29 | |||
30 | /** |
||
31 | * @deprecated use `getValue()` instead |
||
32 | */ |
||
33 | public function getDefaultValue() { |
||
36 | |||
37 | /** |
||
38 | * @deprecated use `hasValue()` instead |
||
39 | */ |
||
40 | public function hasDefaultValue() { |
||
43 | |||
44 | 21 | public function setValue($value) { |
|
50 | |||
51 | 1 | public function unsetValue() { |
|
57 | |||
58 | 12 | public function getValue() { |
|
61 | |||
62 | 20 | public function hasValue() { |
|
65 | |||
66 | 5 | public function isExpression() { |
|
69 | |||
70 | 3 | public function setExpression($expr) { |
|
76 | |||
77 | 2 | public function getExpression() { |
|
80 | |||
81 | 1 | public function unsetExpression() { |
|
87 | } |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.