| Conditions | 1 |
| Paths | 1 |
| Total Lines | 12 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 21 | public function run() |
||
| 22 | { |
||
| 23 | $settings = new Settings(); |
||
| 24 | $settings->key = 'referring_user_points'; |
||
|
|
|||
| 25 | $settings->value = '200'; |
||
| 26 | $settings->save(); |
||
| 27 | |||
| 28 | $settings = new Settings(); |
||
| 29 | $settings->key = 'referred_user_points'; |
||
| 30 | $settings->value = '200'; |
||
| 31 | $settings->save(); |
||
| 32 | } |
||
| 33 | } |
||
| 34 |
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.