| Conditions | 4 |
| Paths | 4 |
| Total Lines | 16 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | protected function _getValue() |
||
| 29 | { |
||
| 30 | if (!is_null($this->value_int)) { |
||
|
|
|||
| 31 | return $this->value_int; |
||
| 32 | } |
||
| 33 | |||
| 34 | if (!is_null($this->value_bool)) { |
||
| 35 | return (bool)$this->value_bool; |
||
| 36 | } |
||
| 37 | |||
| 38 | if (!is_null($this->value_str)) { |
||
| 39 | return $this->value_str; |
||
| 40 | } |
||
| 41 | |||
| 42 | return null; |
||
| 43 | } |
||
| 44 | |||
| 65 |
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@propertyannotation 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.