Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 1 |
Changes | 0 |
1 | <?php |
||
24 | 1 | public function transform(Promotion $promotion) |
|
25 | { |
||
26 | 1 | return array_filter([ |
|
27 | 1 | '$promotion_id' => $promotion->getId(), |
|
28 | 1 | '$status' => $promotion->getStatus(), |
|
29 | 1 | '$failure_reason' => $promotion->getFailureReason(), |
|
30 | 1 | '$description' => $promotion->getDescription(), |
|
31 | 1 | '$referrer_user_id' => $promotion->getReferrerUserId(), |
|
32 | 1 | '$discount' => $this->discount($promotion->getDiscount()), |
|
33 | 1 | '$credit_point' => $this->creditPoint($promotion->getCreditPoint()) |
|
34 | ]); |
||
35 | } |
||
36 | } |
||
37 |