| Conditions | 2 |
| Paths | 2 |
| Total Lines | 10 |
| Code Lines | 5 |
| Lines | 10 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 42 | View Code Duplication | public function map(Field $field) |
|
| 43 | { |
||
| 44 | $values = array(); |
||
| 45 | |||
| 46 | foreach ((array)$field->value as $value) { |
||
| 47 | $values[] = $this->convert($value); |
||
| 48 | } |
||
| 49 | |||
| 50 | return $values; |
||
| 51 | } |
||
| 52 | } |
||
| 53 |
Since your code implements the magic setter
_set, this function will be called for any write access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.Since the property has write access only, you can use the @property-write 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.