@@ -22,7 +22,7 @@ |
||
22 | 22 | ]; |
23 | 23 | |
24 | 24 | //variable part of the response allowed to contain these... |
25 | - protected $allowedVariables=[ |
|
25 | + protected $allowedVariables = [ |
|
26 | 26 | self::AO_INSTITUTION_ID, |
27 | 27 | self::AA_PATRON_IDENTIFIER, |
28 | 28 | self::AF_SCREEN_MESSAGE, |
@@ -37,7 +37,7 @@ |
||
37 | 37 | ]; |
38 | 38 | |
39 | 39 | //variable part of the response allowed to contain these... |
40 | - protected $allowedVariables=[ |
|
40 | + protected $allowedVariables = [ |
|
41 | 41 | self::CF_HOLD_QUEUE_LENGTH, |
42 | 42 | self::AH_DUE_DATE, |
43 | 43 | self::CJ_RECALL_DATE, |
@@ -29,7 +29,7 @@ |
||
29 | 29 | ]; |
30 | 30 | |
31 | 31 | //variable part of the response allowed to contain these... |
32 | - protected $allowedVariables=[ |
|
32 | + protected $allowedVariables = [ |
|
33 | 33 | self::AO_INSTITUTION_ID, |
34 | 34 | self::AA_PATRON_IDENTIFIER, |
35 | 35 | self::AE_PERSONAL_NAME, |
@@ -29,7 +29,7 @@ |
||
29 | 29 | ]; |
30 | 30 | |
31 | 31 | //variable part of the response allowed to contain these... |
32 | - protected $allowedVariables=[ |
|
32 | + protected $allowedVariables = [ |
|
33 | 33 | self::AO_INSTITUTION_ID, |
34 | 34 | self::AA_PATRON_IDENTIFIER, |
35 | 35 | self::AE_PERSONAL_NAME, |
@@ -38,7 +38,7 @@ |
||
38 | 38 | ]; |
39 | 39 | |
40 | 40 | //variable part of the response allowed to contain these... |
41 | - protected $allowedVariables=[ |
|
41 | + protected $allowedVariables = [ |
|
42 | 42 | self::AO_INSTITUTION_ID, |
43 | 43 | self::AA_PATRON_IDENTIFIER, |
44 | 44 | self::AB_ITEM_IDENTIFIER, |
@@ -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 |
@@ -57,8 +57,8 @@ |
||
57 | 57 | { |
58 | 58 | $this->newMessage('37'); |
59 | 59 | $this->addFixedOption($this->datestamp(), 18); |
60 | - $this->addFixedOption(sprintf('%02d', (string)$this->getVariable('FeeType')), 2); |
|
61 | - $this->addFixedOption(sprintf('%02d', (string)$this->getVariable('PaymentType')), 2); |
|
60 | + $this->addFixedOption(sprintf('%02d', (string) $this->getVariable('FeeType')), 2); |
|
61 | + $this->addFixedOption(sprintf('%02d', (string) $this->getVariable('PaymentType')), 2); |
|
62 | 62 | $this->addFixedOption($this->getVariable('CurrencyType'), 3); |
63 | 63 | |
64 | 64 | // due to currency format localization, it is up to the programmer |
@@ -32,7 +32,7 @@ |
||
32 | 32 | $this->newMessage('99'); |
33 | 33 | $this->addFixedOption($this->getVariable('Status'), 1); |
34 | 34 | $this->addFixedOption($this->getVariable('Width'), 3); |
35 | - $this->addFixedOption(sprintf("%03.2f", (float)$this->getVariable('Version')), 4); |
|
35 | + $this->addFixedOption(sprintf("%03.2f", (float) $this->getVariable('Version')), 4); |
|
36 | 36 | |
37 | 37 | return $this->returnMessage($withSeq, $withCrc); |
38 | 38 | } |