| Total Complexity | 8 |
| Total Lines | 82 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 16 | class Statuses { |
||
| 17 | /** |
||
| 18 | * Completed successfully |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | const COMPLETED = 'completed'; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Created, but uncompleted |
||
| 26 | * |
||
| 27 | * @var string |
||
| 28 | */ |
||
| 29 | const INITIALIZED = 'initialized'; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Created, but not yet exempted (credit cards) |
||
| 33 | * |
||
| 34 | * @var string |
||
| 35 | */ |
||
| 36 | const UNCLEARED = 'uncleared'; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * Cancelled |
||
| 40 | * |
||
| 41 | * @var string |
||
| 42 | */ |
||
| 43 | const VOID = 'void'; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Rejected |
||
| 47 | * |
||
| 48 | * @var string |
||
| 49 | */ |
||
| 50 | const DECLINED = 'declined'; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Refunded |
||
| 54 | * |
||
| 55 | * @var string |
||
| 56 | */ |
||
| 57 | const REFUNDED = 'refunded'; |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Expired |
||
| 61 | * |
||
| 62 | * @var string |
||
| 63 | */ |
||
| 64 | const EXPIRED = 'expired'; |
||
| 65 | |||
| 66 | /** |
||
| 67 | * Transform an MultiSafepay state to an more global status |
||
| 68 | * |
||
| 69 | * @param string $status |
||
| 70 | * |
||
| 71 | * @return null|string |
||
| 72 | */ |
||
| 73 | public static function transform( $status ) { |
||
| 101 |