| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 64 | public function revert() |
||
| 65 | { |
||
| 66 | $model = $this->getModel(); |
||
| 67 | unset( $model->{$model->getCreatedAtColumn()} ); |
||
| 68 | unset( $model->{$model->getUpdatedAtColumn()} ); |
||
| 69 | if (method_exists($model, 'getDeletedAtColumn')) { |
||
| 70 | unset( $model->{$model->getDeletedAtColumn()} ); |
||
| 71 | } |
||
| 72 | $model->save(); |
||
| 73 | return $model; |
||
| 74 | } |
||
| 75 | |||
| 76 | } |
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.