Conditions | 8 |
Paths | 8 |
Total Lines | 25 |
Code Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Tests | 16 |
CRAP Score | 8 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
73 | 8 | public static function transform( $status ) { |
|
74 | switch ( $status ) { |
||
75 | 8 | case self::COMPLETED: |
|
76 | 1 | return Core_Statuses::SUCCESS; |
|
77 | |||
78 | 7 | case self::INITIALIZED: |
|
79 | 1 | return Core_Statuses::OPEN; |
|
80 | |||
81 | 6 | case self::UNCLEARED: |
|
82 | 1 | return Core_Statuses::OPEN; |
|
83 | |||
84 | 5 | case self::VOID: |
|
85 | 1 | return Core_Statuses::CANCELLED; |
|
86 | |||
87 | 4 | case self::DECLINED: |
|
88 | 1 | return Core_Statuses::FAILURE; |
|
89 | |||
90 | 3 | case self::REFUNDED: |
|
91 | 1 | return Core_Statuses::CANCELLED; |
|
92 | |||
93 | 2 | case self::EXPIRED: |
|
94 | 1 | return Core_Statuses::EXPIRED; |
|
95 | |||
96 | default: |
||
97 | 1 | return null; |
|
98 | } |
||
101 |