wp-pay-gateways /
omnikassa-2
| 1 | <?php |
||
| 2 | /** |
||
| 3 | * Statuses |
||
| 4 | * |
||
| 5 | * @author Pronamic <[email protected]> |
||
| 6 | * @copyright 2005-2019 Pronamic |
||
| 7 | * @license GPL-3.0-or-later |
||
| 8 | * @package Pronamic\WordPress\Pay\Gateways\OmniKassa2 |
||
| 9 | */ |
||
| 10 | |||
| 11 | namespace Pronamic\WordPress\Pay\Gateways\OmniKassa2; |
||
| 12 | |||
| 13 | use Pronamic\WordPress\Pay\Payments\PaymentStatus as Core_Statuses; |
||
|
0 ignored issues
–
show
|
|||
| 14 | |||
| 15 | /** |
||
| 16 | * Statuses |
||
| 17 | * |
||
| 18 | * @author Remco Tolsma |
||
| 19 | * @version 2.1.0 |
||
| 20 | * @since 1.0.0 |
||
| 21 | */ |
||
| 22 | class Statuses { |
||
| 23 | /** |
||
| 24 | * Cancelled. |
||
| 25 | * |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | const CANCELLED = 'CANCELLED'; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Completed. |
||
| 32 | * |
||
| 33 | * @var string |
||
| 34 | */ |
||
| 35 | const COMPLETED = 'COMPLETED'; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Expired. |
||
| 39 | * |
||
| 40 | * @var string |
||
| 41 | */ |
||
| 42 | const EXPIRED = 'EXPIRED'; |
||
| 43 | |||
| 44 | /** |
||
| 45 | * In progress. |
||
| 46 | * |
||
| 47 | * @var string |
||
| 48 | */ |
||
| 49 | const IN_PROGRESS = 'IN_PROGRESS'; |
||
| 50 | |||
| 51 | /** |
||
| 52 | * Transform an OmniKassa 2.0 status to Pronamic Pay status. |
||
| 53 | * |
||
| 54 | * @param string $status OmniKassa 2.0 status. |
||
| 55 | * @return string|null |
||
| 56 | */ |
||
| 57 | 5 | public static function transform( $status ) { |
|
| 58 | switch ( $status ) { |
||
| 59 | 5 | case self::CANCELLED: |
|
| 60 | 1 | return Core_Statuses::CANCELLED; |
|
| 61 | 4 | case self::COMPLETED: |
|
| 62 | 1 | return Core_Statuses::SUCCESS; |
|
| 63 | 3 | case self::EXPIRED: |
|
| 64 | 1 | return Core_Statuses::EXPIRED; |
|
| 65 | 2 | case self::IN_PROGRESS: |
|
| 66 | 1 | return Core_Statuses::OPEN; |
|
| 67 | default: |
||
| 68 | 1 | return null; |
|
| 69 | } |
||
| 70 | } |
||
| 71 | } |
||
| 72 |
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths