Cancel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 9
c 1
b 0
f 1
dl 0
loc 32
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A create_CancelDate() 0 6 2
A __construct() 0 7 1
1
<?php
2
3
/**
4
 *      Class for response to Cancel request
5
 *
6
 *      @package php_EasyPay
7
 *      @version 1.1
8
 *      @author Dmitry Shovchko <[email protected]>
9
 *
10
 */
11
12
namespace EasyPay\Provider31\Response;
13
14
use \EasyPay\Provider31\Response as Response;
15
16
final class Cancel extends Response
17
{
18
    /**
19
     *      @var \DOMElement
20
     */
21
    protected $CancelDate;
22
23
	/**
24
     *      Cancel constructor
25
     *
26
     *      @param string $orderdate
27
     */
28
	public function __construct($canceldate) {
29
		parent::__construct();
30
31
		$this->setElementValue('StatusCode', 0);
32
		$this->setElementValue('StatusDetail', 'checked');
33
34
		$this->create_CancelDate($canceldate);
35
	}
36
37
	/**
38
     *      Create CancelDate node
39
     *
40
     *      @param string $canceldate
41
     */
42
	public function create_CancelDate($canceldate)
43
	{
44
		if (isset($this->CancelDate)) return;
45
46
		$this->CancelDate = $this->createElement('CancelDate', $canceldate);
47
		$this->Response->appendChild($this->CancelDate);
48
	}
49
}
50