@@ -20,7 +20,7 @@ |
||
20 | 20 | * @param string $message |
21 | 21 | * @param \Throwable $previous |
22 | 22 | */ |
23 | - public function __construct($message, $code=0, \Exception $previous=null) |
|
23 | + public function __construct($message, $code = 0, \Exception $previous = null) |
|
24 | 24 | { |
25 | 25 | parent::__construct($message, $code, $previous, true); |
26 | 26 | } |
@@ -21,9 +21,9 @@ |
||
21 | 21 | * @param string $message |
22 | 22 | * @param \Throwable $previous |
23 | 23 | */ |
24 | - public function __construct($message, $code=0, \Exception $previous=null, $tracelog=false) |
|
24 | + public function __construct($message, $code = 0, \Exception $previous = null, $tracelog = false) |
|
25 | 25 | { |
26 | - Log::instance()->error($message.(($tracelog)?PHP_EOL.$this->getTraceAsString():null)); |
|
26 | + Log::instance()->error($message.(($tracelog) ?PHP_EOL.$this->getTraceAsString() : null)); |
|
27 | 27 | parent::__construct($message, $code, $previous); |
28 | 28 | } |
29 | 29 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | */ |
62 | 62 | private static function get_http_raw_post_data() |
63 | 63 | { |
64 | - Log::instance()->add('request from ' . $_SERVER['REMOTE_ADDR']); |
|
64 | + Log::instance()->add('request from '.$_SERVER['REMOTE_ADDR']); |
|
65 | 65 | |
66 | 66 | $raw_request = file_get_contents('php://input'); |
67 | 67 |
@@ -52,7 +52,7 @@ |
||
52 | 52 | * @param string $name |
53 | 53 | * @param string $value (optional) |
54 | 54 | */ |
55 | - public function createElement($name, $value=NULL) |
|
55 | + public function createElement($name, $value = NULL) |
|
56 | 56 | { |
57 | 57 | return parent::createElement($name, $value); |
58 | 58 | } |
@@ -48,7 +48,7 @@ |
||
48 | 48 | $this->AccountInfo = $this->createElement('AccountInfo'); |
49 | 49 | $this->Response->appendChild($this->AccountInfo); |
50 | 50 | |
51 | - foreach($accountinfo as $parameter=>$value) |
|
51 | + foreach ($accountinfo as $parameter=>$value) |
|
52 | 52 | { |
53 | 53 | $this->AccountInfo->appendChild($this->createElement($parameter, $value)); |
54 | 54 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | /** |
46 | 46 | * @var array list of possible operations |
47 | 47 | */ |
48 | - protected $operations = array('Check','Payment','Confirm','Cancel'); |
|
48 | + protected $operations = array('Check', 'Payment', 'Confirm', 'Cancel'); |
|
49 | 49 | |
50 | 50 | /** |
51 | 51 | * General constructor |
@@ -115,7 +115,7 @@ discard block |
||
115 | 115 | $doc = new \DOMDocument(); |
116 | 116 | if ( ! $doc->loadXML($this->raw_request)) |
117 | 117 | { |
118 | - foreach(libxml_get_errors() as $e){ |
|
118 | + foreach (libxml_get_errors() as $e) { |
|
119 | 119 | Log::instance()->error($e->message); |
120 | 120 | } |
121 | 121 | throw new Exception\Structure('The wrong XML is received', -51); |
@@ -313,9 +313,9 @@ discard block |
||
313 | 313 | * |
314 | 314 | * @return array nodes with the name |
315 | 315 | */ |
316 | - protected function getNodes($dom, $name, $ret=array()) |
|
316 | + protected function getNodes($dom, $name, $ret = array()) |
|
317 | 317 | { |
318 | - foreach($dom->childNodes as $child) |
|
318 | + foreach ($dom->childNodes as $child) |
|
319 | 319 | { |
320 | 320 | if ($child->nodeName == $name) |
321 | 321 | { |