Conditions | 6 |
Paths | 6 |
Total Lines | 19 |
Code Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 42 |
Changes | 2 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
67 | public static function transform( $status ) { |
||
68 | switch ( $status ) { |
||
69 | case self::CANCELLED: |
||
70 | return Core_Statuses::CANCELLED; |
||
71 | |||
72 | case self::COMPLETED: |
||
73 | return Core_Statuses::SUCCESS; |
||
74 | |||
75 | case self::EXPIRED: |
||
76 | return Core_Statuses::EXPIRED; |
||
77 | |||
78 | case self::FAILED: |
||
79 | return Core_Statuses::FAILURE; |
||
80 | |||
81 | case self::PENDING: |
||
82 | return Core_Statuses::OPEN; |
||
83 | |||
84 | default: |
||
85 | return null; |
||
86 | } |
||
89 |