| 1 | <?php  | 
            ||
| 20 | class DocumentMapper extends FieldValueMapper  | 
            ||
| 21 | { | 
            ||
| 22 | /**  | 
            ||
| 23 | * Check if field can be mapped.  | 
            ||
| 24 | *  | 
            ||
| 25 | * @param \eZ\Publish\SPI\Search\Field $field  | 
            ||
| 26 | *  | 
            ||
| 27 | * @return bool  | 
            ||
| 28 | */  | 
            ||
| 29 | public function canMap(Field $field)  | 
            ||
| 33 | |||
| 34 | /**  | 
            ||
| 35 | * Map field value to a proper Elasticsearch representation.  | 
            ||
| 36 | *  | 
            ||
| 37 | * @param \eZ\Publish\SPI\Search\Field $field  | 
            ||
| 38 | *  | 
            ||
| 39 | * @return mixed  | 
            ||
| 40 | */  | 
            ||
| 41 | public function map(Field $field)  | 
            ||
| 45 | }  | 
            ||
| 46 | 
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.