@@ -42,7 +42,7 @@ |
||
42 | 42 | $this->AccountInfo = self::createElement('AccountInfo'); |
43 | 43 | $this->Response->appendChild($this->AccountInfo); |
44 | 44 | |
45 | - foreach($accountinfo as $parameter=>$value) |
|
45 | + foreach ($accountinfo as $parameter=>$value) |
|
46 | 46 | { |
47 | 47 | $this->AccountInfo->appendChild(self::createElement($parameter, $value)); |
48 | 48 | } |
@@ -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 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | /** |
45 | 45 | * @var array list of possible operations |
46 | 46 | */ |
47 | - protected $operations = array('Check','Payment','Confirm','Cancel'); |
|
47 | + protected $operations = array('Check', 'Payment', 'Confirm', 'Cancel'); |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * General constructor |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $doc = new \DOMDocument(); |
115 | 115 | if ( ! $doc->loadXML($this->raw_request)) |
116 | 116 | { |
117 | - foreach(libxml_get_errors() as $e){ |
|
117 | + foreach (libxml_get_errors() as $e) { |
|
118 | 118 | Log::instance()->error($e->message); |
119 | 119 | } |
120 | 120 | throw new Exception\Structure('The wrong XML is received', -51); |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | */ |
227 | 227 | public function verify_sign($options) |
228 | 228 | { |
229 | - if (!isset($options['UseSign']) || ($options['UseSign'] === false)) |
|
229 | + if ( ! isset($options['UseSign']) || ($options['UseSign'] === false)) |
|
230 | 230 | { |
231 | 231 | return null; |
232 | 232 | } |
@@ -280,9 +280,9 @@ discard block |
||
280 | 280 | * |
281 | 281 | * @return array nodes with the name |
282 | 282 | */ |
283 | - protected function getNodes($dom, $name, $ret=array()) |
|
283 | + protected function getNodes($dom, $name, $ret = array()) |
|
284 | 284 | { |
285 | - foreach($dom->childNodes as $child) |
|
285 | + foreach ($dom->childNodes as $child) |
|
286 | 286 | { |
287 | 287 | if ($child->nodeName == $name) |
288 | 288 | { |
@@ -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 | } |