@@ -100,12 +100,12 @@ discard block |
||
100 | 100 | $socket->write($xml); |
101 | 101 | |
102 | 102 | $responseLine = $socket->getLine(); |
103 | - if ($command->getGroup() . ':' . $command->getAction() === 'instance:query') { |
|
103 | + if ($command->getGroup().':'.$command->getAction() === 'instance:query') { |
|
104 | 104 | // dump($responseLine, $command->getGroup() . ':' . $command->getAction()); |
105 | 105 | } |
106 | 106 | $xml = new \SimpleXMLElement($responseLine); |
107 | 107 | $json = json_encode($xml); |
108 | - $responseLine = json_decode($json,TRUE); |
|
108 | + $responseLine = json_decode($json, TRUE); |
|
109 | 109 | $responseName = preg_replace('#^(\S+).*$#s', '$1', $responseLine["@attributes"]['status']); |
110 | 110 | if ($responseName === "KO") { |
111 | 111 | $exceptionType = $responseLine['@attributes']['error-code'] ?? Response::RESPONSE_SERVER_ERROR; |
@@ -208,10 +208,10 @@ discard block |
||
208 | 208 | * |
209 | 209 | * @return \DOMDocument |
210 | 210 | */ |
211 | - protected function build_query($name, $action = false, $attributes = [], $parameters = []){ |
|
211 | + protected function build_query($name, $action = false, $attributes = [], $parameters = []) { |
|
212 | 212 | $dom = new \DOMDocument("1.0", "utf-8"); |
213 | 213 | $root = $dom->createElement($name); |
214 | - if($action) |
|
214 | + if ($action) |
|
215 | 215 | $root->setAttribute('action', $action); |
216 | 216 | foreach ($attributes as $key => $value) { |
217 | 217 | $root->setAttribute($key, $value); |