Test Failed
Push — feature/post-pay ( 3d7a3c...4d62a9 )
by Remco
03:56
created

StatusRequest::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 3
1
<?php
2
/**
3
 * Status request
4
 *
5
 * @author    Pronamic <[email protected]>
6
 * @copyright 2005-2018 Pronamic
7
 * @license   GPL-3.0-or-later
8
 * @package   Pronamic\WordPress\Pay\Payments
9
 */
10
11
namespace Pronamic\WordPress\Pay\Gateways\Sisow;
12
13
use Pronamic\WordPress\Pay\Core\Util as Pay_Util;
14
use Pronamic\WordPress\Pay\Payments\Items;
15
16
/**
17
 * Status request
18
 *
19
 * @author  Remco Tolsma
20
 * @version 2.0.0
21
 * @since   1.0.0
22
 */
23
class StatusRequest extends Request {
24
	/**
25
	 * Constructs status request object.
26
	 *
27
	 * @param string      $transaction_id Transaction ID.
28
	 * @param string      $merchant_id    Merchant ID.
29
	 * @param string|null $shop_id        Shop ID.
30
	 */
31
	public function __construct( $transaction_id, $merhant_id, $shop_id = null ) {
0 ignored issues
show
Unused Code introduced by
The parameter $shop_id is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

31
	public function __construct( $transaction_id, $merhant_id, /** @scrutinizer ignore-unused */ $shop_id = null ) {

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
32
		parent::__construct( $merhant_id, $shop_id = null );
33
34
		$this->set_parameter( 'trxid', $transaction_id );
35
	}
36
37
	/**
38
	 * Get signature data.
39
	 *
40
	 * @return array
41
	 */
42
	public function get_signature_data() {
43
		return array(
44
			$this->get_parameter( 'trxid' ),
45
46
			/*
47
			 * Indien er geen gebruik wordt gemaakt van de shopid dan kunt u deze weglaten uit de berekening.
48
			 */
49
			$this->get_parameter( 'shopid' ),
50
51
			$this->get_parameter( 'merchantid' ),
52
53
			$this->get_parameter( 'merchantkey' ),
54
		);
55
	}
56
}
57