Total Complexity | 3 |
Total Lines | 31 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
27 | trait TokenTrait |
||
28 | { |
||
29 | use HasPurchaseParent; |
||
30 | use HasGatewayRecordTrait; |
||
31 | use TimestampableTrait; |
||
32 | |||
33 | /** |
||
34 | * @var string |
||
35 | */ |
||
36 | static protected $createTimestamps = ['created']; |
||
37 | |||
38 | /** |
||
39 | * @var string |
||
40 | */ |
||
41 | static protected $updateTimestamps = ['modified']; |
||
42 | |||
43 | /** |
||
44 | * @param PaymentMethod $gateway |
||
45 | */ |
||
46 | public function populateFromPaymentMethod($method) |
||
47 | { |
||
48 | $this->id_method = is_object($method) ? $method->id : $method; |
||
49 | } |
||
50 | |||
51 | /** |
||
52 | * @param TokenInterface $token |
||
53 | */ |
||
54 | public function populateFromToken(TokenInterface $token) |
||
58 | } |
||
59 | } |
||
60 |