Conditions | 2 |
Paths | 2 |
Total Lines | 37 |
Code Lines | 30 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
22 | public static function createFromRow(array $row): HistoryItem |
||
23 | { |
||
24 | [ |
||
25 | , |
||
26 | $time, |
||
27 | $type, |
||
28 | $details, |
||
29 | $lesion, |
||
30 | $profit, |
||
31 | $status, |
||
32 | $balance, |
||
33 | $reference, |
||
34 | $amount, |
||
35 | $currency, |
||
36 | $info, |
||
37 | $skrillId, |
||
38 | $paymentType, |
||
39 | ] = $row; |
||
40 | |||
41 | if (!$datetime = DateTimeImmutable::createFromFormat('d M y H:i', $time)) { |
||
42 | throw SkrillResponseException::fromSkillError(sprintf('Invalid time "%s".', $time)); |
||
43 | } |
||
44 | |||
45 | return new HistoryItem( |
||
46 | $reference, |
||
47 | $skrillId, |
||
48 | $datetime, |
||
49 | $type, |
||
50 | $details, |
||
51 | $lesion, |
||
52 | $profit, |
||
53 | $status, |
||
54 | $balance, |
||
55 | $amount, |
||
56 | $currency, |
||
57 | $info, |
||
58 | $paymentType |
||
59 | ); |
||
62 |