| Conditions | 5 |
| Paths | 5 |
| Total Lines | 12 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5 |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 57 | 5 | public static function transform( $status ) { |
|
| 58 | switch ( $status ) { |
||
| 59 | 5 | case self::CANCELLED: |
|
| 60 | 1 | return PaymentStatus::CANCELLED; |
|
| 61 | 4 | case self::COMPLETED: |
|
| 62 | 1 | return PaymentStatus::SUCCESS; |
|
| 63 | 3 | case self::EXPIRED: |
|
| 64 | 1 | return PaymentStatus::EXPIRED; |
|
| 65 | 2 | case self::IN_PROGRESS: |
|
| 66 | 1 | return PaymentStatus::OPEN; |
|
| 67 | default: |
||
| 68 | 1 | return null; |
|
| 69 | } |
||
| 72 |