Failed Conditions
Push — develop ( 1f8c75...611b60 )
by Remco
05:42
created

ApplePayGateway::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 9

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 9
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 12
ccs 0
cts 10
cp 0
crap 2
rs 9.9666
1
<?php
2
/**
3
 * Apple Pay gateway
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2021 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Extensions\MemberPress
9
 */
10
11
namespace Pronamic\WordPress\Pay\Extensions\MemberPress\Gateways;
12
13
use Pronamic\WordPress\Pay\Core\PaymentMethods;
14
15
/**
16
 * WordPress pay MemberPress Apple Pay gateway
17
 *
18
 * @author  Reüel van der Steege
19
 * @version 2.3.0
20
 * @since   2.3.0
21
 */
22
class ApplePayGateway extends Gateway {
0 ignored issues
show
Bug introduced by
The type Pronamic\WordPress\Pay\E...rPress\Gateways\Gateway 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...
23
	/**
24
	 * Constructs and initialize Apple Pay gateway.
25
	 */
26
	public function __construct() {
27
		parent::__construct( 'MeprApplePayGateway', PaymentMethods::APPLE_PAY );
28
29
		// Capabilities.
30
		$this->capabilities = array(
0 ignored issues
show
Bug Best Practice introduced by
The property capabilities does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
31
			'process-payments',
32
			'create-subscriptions',
33
			'cancel-subscriptions',
34
			'update-subscriptions',
35
			'suspend-subscriptions',
36
			'resume-subscriptions',
37
			'subscription-trial-payment',
38
		);
39
	}
40
}
41