Conditions | 3 |
Paths | 3 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
34 | public function __get($propName) |
||
35 | { |
||
36 | $tmp = $this->getValueWithDefault($propName); |
||
37 | if($tmp !== false) |
||
38 | { |
||
39 | return $tmp; |
||
40 | } |
||
41 | $tmp = $this->getMultiValueProp($propName); |
||
42 | if($tmp !== false) |
||
43 | { |
||
44 | return $tmp; |
||
45 | } |
||
46 | return $this->getFieldSingleValue($propName); |
||
47 | } |
||
48 | } |
||
51 |
Since your code implements the magic getter
_get
, this function will be called for any read access on an undefined variable. You can add the@property
annotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.