Conditions | 1 |
Paths | 1 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 10 |
Ratio | 100 % |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
63 | View Code Duplication | public static function createCustomer($token, $from, $params = []) |
|
64 | { |
||
65 | $params = array_merge([ |
||
66 | "email" => $from->email, |
||
67 | 'source' => $token, |
||
68 | ], $params); |
||
69 | return self::create($from, 'customer_id', function () use ($params) { |
||
70 | return Customer::create($params); |
||
71 | }); |
||
72 | } |
||
73 | |||
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@property
annotation 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.