Confirm   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 8 1
A create_OrderDate() 0 6 2
1
<?php
2
3
/**
4
 *      Class for response to Confirm 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 Confirm extends Response
17
{
18
    /**
19
     *      @var \DOMElement
20
     */
21
    protected $OrderDate;
22
23
	/**
24
     *      Confirm constructor
25
     *
26
     *      @param string $orderdate
27
     */
28
    public function __construct($orderdate)
29
    {
30
		parent::__construct();
31
32
		$this->setElementValue('StatusCode', 0);
33
		$this->setElementValue('StatusDetail', 'checked');
34
35
		$this->create_OrderDate($orderdate);
36
	}
37
38
	/**
39
     *      Create OrderDate node
40
     *
41
     *      @param string $orderdate
42
     */
43
	public function create_OrderDate($orderdate)
44
	{
45
		if (isset($this->OrderDate)) return;
46
47
		$this->OrderDate = $this->createElement('OrderDate', $orderdate);
48
		$this->Response->appendChild($this->OrderDate);
49
	}
50
}
51