Failed Conditions
Push — develop ( 6bd166...d20625 )
by Remco
06:19
created

src/Gender.php (1 issue)

Labels
Severity
1
<?php
2
/**
3
 * Gender.
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2018 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\OmniKassa2;
12
13
use Pronamic\WordPress\Pay\Gender as Core_Gender;
0 ignored issues
show
The type Pronamic\WordPress\Pay\Gender was not found. Maybe you did not declare it correctly or list all dependencies?

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:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
14
15
/**
16
 * Gender.
17
 *
18
 * @author  Remco Tolsma
19
 * @since   2.0.4
20
 * @version 2.0.4
21
 */
22
class Gender {
23
	/**
24
	 * Female.
25
	 *
26
	 * @var string
27
	 */
28
	const FEMALE = 'F';
29
30
	/**
31
	 * Male.
32
	 *
33
	 * @var string
34
	 */
35
	const MALE = 'M';
36
37
	/**
38
	 * Transform WordPress pay gender to OmniKassa gender.
39
	 *
40
	 * @param string|null $gender WordPress pay gender.
41
	 * @return string|null
42
	 */
43
	public static function transform( $gender ) {
44
		switch ( $gender ) {
45
			case Core_Gender::FEMALE:
46
				return self::FEMALE;
47
			case Core_Gender::MALE:
48
				return self::MALE;
49
			case Core_Gender::OTHER:
50
			default:
51
				return null;
52
		}
53
	}
54
}
55