| Conditions | 1 |
| Paths | 1 |
| Total Lines | 10 |
| Code Lines | 7 |
| Lines | 10 |
| Ratio | 100 % |
| Changes | 3 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 46 | View Code Duplication | public static function createAccount($to, $params = []) |
|
| 47 | { |
||
| 48 | $params = array_merge([ |
||
| 49 | "type" => "custom", |
||
| 50 | "email" => $to->email, |
||
| 51 | ], $params); |
||
| 52 | return self::create($to, 'account_id', function () use ($params) { |
||
| 53 | return Customer::create($params); |
||
| 54 | }); |
||
| 55 | } |
||
| 56 | |||
| 98 | } |
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.