| Total Complexity | 4 |
| Total Lines | 38 |
| Duplicated Lines | 0 % |
| Coverage | 40% |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 22 | class Util { |
||
| 23 | /** |
||
| 24 | * Filter null. |
||
| 25 | * |
||
| 26 | * @param array<int|string, mixed> $array Array to filter null values from. |
||
| 27 | * @return array<int|string, mixed> |
||
| 28 | */ |
||
| 29 | 15 | public static function filter_null( $array ) { |
|
| 30 | 15 | return array_filter( $array, array( __CLASS__, 'is_not_null' ) ); |
|
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Check if value is not null. |
||
| 35 | * |
||
| 36 | * @param mixed $value Value. |
||
| 37 | * @return boolean True if value is not null, false otherwise. |
||
| 38 | */ |
||
| 39 | 15 | private static function is_not_null( $value ) { |
|
| 40 | 15 | return ( null !== $value ); |
|
| 41 | } |
||
| 42 | |||
| 43 | /** |
||
| 44 | * Get payment country code. |
||
| 45 | * |
||
| 46 | * @param Payment $payment |
||
| 47 | * |
||
| 48 | * @return string |
||
| 49 | */ |
||
| 50 | public static function get_payment_locale( Payment $payment ) { |
||
| 60 | } |
||
| 61 | } |
||
| 62 |