| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 4 |
| Lines | 7 |
| Ratio | 100 % |
| Tests | 0 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 45 | View Code Duplication | public function rules() |
|
| 46 | { |
||
| 47 | return array_merge(parent::rules(), [ |
||
| 48 | [['server', 'expires'], 'safe'], |
||
| 49 | [['expires', 'amount'], 'required'], |
||
| 50 | ]); |
||
| 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.