| 1 | <?php |
||
| 8 | abstract class Error |
||
| 9 | { |
||
| 10 | const ERROR_CODE = 'UNKNOWN'; |
||
| 11 | |||
| 12 | /** @var string */ |
||
| 13 | protected $code = self::ERROR_CODE; |
||
| 14 | |||
| 15 | /** @var string */ |
||
| 16 | protected $message = '%value% is not valid for column %column% from type %type%'; |
||
| 17 | |||
| 18 | /** @var mixed */ |
||
| 19 | protected $value; |
||
| 20 | |||
| 21 | /** @var Column */ |
||
| 22 | public $column; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Error constructor. |
||
| 26 | * |
||
| 27 | * @param Column $column |
||
| 28 | */ |
||
| 29 | 2 | public function __construct(Column $column, $value = null, $code = null, $message = null) |
|
| 49 | } |
||
| 50 |
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.