@@ -40,7 +40,7 @@ discard block |
||
40 | 40 | /** |
41 | 41 | * @var array name=>value request defaults used for every request |
42 | 42 | */ |
43 | - private $default=[]; |
|
43 | + private $default = []; |
|
44 | 44 | |
45 | 45 | //----------------------------------------------------- |
46 | 46 | // connection handling |
@@ -132,7 +132,7 @@ discard block |
||
132 | 132 | } |
133 | 133 | //@codeCoverageIgnoreEnd |
134 | 134 | |
135 | - $result = $result . $terminator; |
|
135 | + $result = $result.$terminator; |
|
136 | 136 | } |
137 | 137 | |
138 | 138 | $this->logger->info("SIP2: result={$result}"); |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | $this->logger->warning("SIP2: Message failed CRC check, retry {$depth})"); |
148 | 148 | $result = $this->getRawResponse($request, $depth); |
149 | 149 | } else { |
150 | - $errMsg="SIP2: Failed to get valid CRC after {$this->maxretry} retries."; |
|
150 | + $errMsg = "SIP2: Failed to get valid CRC after {$this->maxretry} retries."; |
|
151 | 151 | $this->logger->critical($errMsg); |
152 | 152 | throw new RuntimeException($errMsg); |
153 | 153 | } |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } catch (\Exception $e) { |
183 | 183 | $this->socket->close(); |
184 | 184 | $this->socket = null; |
185 | - $this->logger->error("SIP2Client: Failed to connect: " . $e->getMessage()); |
|
185 | + $this->logger->error("SIP2Client: Failed to connect: ".$e->getMessage()); |
|
186 | 186 | throw new RuntimeException("Connection failure", 0, $e); |
187 | 187 | } |
188 | 188 |
@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | * @var array provides a list of the variables this message can use. Array key is the variable name in |
20 | 20 | * StudlyCaps, value is an array which can contain type, default values |
21 | 21 | */ |
22 | - protected $var=[]; |
|
22 | + protected $var = []; |
|
23 | 23 | |
24 | 24 | /** @var integer|null current timestamp, useful for testing */ |
25 | 25 | protected $timestamp = null; |
@@ -96,7 +96,7 @@ discard block |
||
96 | 96 | */ |
97 | 97 | public function getAll() |
98 | 98 | { |
99 | - $result=[]; |
|
99 | + $result = []; |
|
100 | 100 | foreach ($this->var as $name => $data) { |
101 | 101 | $result[$name] = $this->getVariable($name); |
102 | 102 | } |
@@ -188,19 +188,19 @@ discard block |
||
188 | 188 | protected function ensureVariableExists($name) |
189 | 189 | { |
190 | 190 | if (!isset($this->var[$name])) { |
191 | - throw new LogicException(get_class($this) . ' has no ' . $name . ' member'); |
|
191 | + throw new LogicException(get_class($this).' has no '.$name.' member'); |
|
192 | 192 | } |
193 | 193 | } |
194 | 194 | |
195 | 195 | protected function handleMissing($varName) |
196 | 196 | { |
197 | - throw new LogicException(get_class($this) . '::set' . $varName . ' must be called'); |
|
197 | + throw new LogicException(get_class($this).'::set'.$varName.' must be called'); |
|
198 | 198 | } |
199 | 199 | |
200 | 200 | public function __call($name, $arguments) |
201 | 201 | { |
202 | 202 | if (!preg_match('/^(get|set)(.+)$/', $name, $match)) { |
203 | - throw new LogicException(get_class($this) . ' has no ' . $name . ' method'); |
|
203 | + throw new LogicException(get_class($this).' has no '.$name.' method'); |
|
204 | 204 | } |
205 | 205 | $varName = $match[2]; |
206 | 206 |