@@ -23,7 +23,7 @@ |
||
23 | 23 | ]; |
24 | 24 | |
25 | 25 | //variable part of the response allowed to contain these... |
26 | - protected $allowedVariables=[ |
|
26 | + protected $allowedVariables = [ |
|
27 | 27 | self::AB_ITEM_IDENTIFIER, |
28 | 28 | self::AJ_TITLE_IDENTIFIER, |
29 | 29 | self::CH_ITEM_PROPERTIES, |
@@ -40,7 +40,7 @@ |
||
40 | 40 | ]; |
41 | 41 | |
42 | 42 | //variable part of the response allowed to contain these... |
43 | - protected $allowedVariables=[ |
|
43 | + protected $allowedVariables = [ |
|
44 | 44 | self::AO_INSTITUTION_ID, |
45 | 45 | self::AM_LIBRARY_NAME, |
46 | 46 | self::BX_SUPPORTED_MESSAGES, |
@@ -21,11 +21,11 @@ discard block |
||
21 | 21 | const AG_PRINT_LINE = 'AG'; |
22 | 22 | const AH_DUE_DATE = 'AH'; |
23 | 23 | const AJ_TITLE_IDENTIFIER = 'AJ'; |
24 | - const AM_LIBRARY_NAME='AM'; |
|
25 | - const AN_TERMINAL_LOCATION='AN'; |
|
24 | + const AM_LIBRARY_NAME = 'AM'; |
|
25 | + const AN_TERMINAL_LOCATION = 'AN'; |
|
26 | 26 | const AO_INSTITUTION_ID = 'AO'; |
27 | 27 | const AP_CURRENT_LOCATION = 'AP'; |
28 | - const AQ_PERMANENT_LOCATION='AQ'; |
|
28 | + const AQ_PERMANENT_LOCATION = 'AQ'; |
|
29 | 29 | const AS_HOLD_ITEMS = 'AS'; |
30 | 30 | const AT_OVERDUE_ITEMS = 'AT'; |
31 | 31 | const AU_CHARGED_ITEMS = 'AU'; |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | const BF_HOME_PHONE_NUMBER = 'BF'; |
37 | 37 | const BG_OWNER = 'BG'; |
38 | 38 | const BH_CURRENCY_TYPE = 'BH'; |
39 | - const BK_TRANSACTION_ID= 'BK'; |
|
39 | + const BK_TRANSACTION_ID = 'BK'; |
|
40 | 40 | const BL_VALID_PATRON = 'BL'; |
41 | 41 | const BM_RENEWED_ITEMS = 'BM'; |
42 | 42 | const BN_UNRENEWED_ITEMS = 'BN'; |
@@ -46,18 +46,18 @@ discard block |
||
46 | 46 | const BU_RECALL_ITEMS = 'BU'; |
47 | 47 | const BV_FEE_AMOUNT = 'BV'; |
48 | 48 | const BW_EXPIRATION_DATE = 'BW'; |
49 | - const BX_SUPPORTED_MESSAGES='BX'; |
|
49 | + const BX_SUPPORTED_MESSAGES = 'BX'; |
|
50 | 50 | const BZ_HOLD_ITEMS_LIMIT = 'BZ'; |
51 | 51 | const CA_OVERDUE_ITEMS_LIMIT = 'CA'; |
52 | 52 | const CB_CHARGED_ITEMS_LIMIT = 'CB'; |
53 | 53 | const CC_FEE_LIMIT = 'CC'; |
54 | 54 | const CD_UNAVAILABLE_HOLD_ITEMS = 'CD'; |
55 | 55 | const CF_HOLD_QUEUE_LENGTH = 'CF'; |
56 | - const CH_ITEM_PROPERTIES= 'CH'; |
|
56 | + const CH_ITEM_PROPERTIES = 'CH'; |
|
57 | 57 | const CI_SECURITY_INHIBIT = 'CI'; |
58 | 58 | const CJ_RECALL_DATE = 'CJ'; |
59 | - const CK_MEDIA_TYPE= 'CK'; |
|
60 | - const CL_SORT_BIN='CL'; |
|
59 | + const CK_MEDIA_TYPE = 'CK'; |
|
60 | + const CL_SORT_BIN = 'CL'; |
|
61 | 61 | const CM_HOLD_PICKUP_DATE = 'CM'; |
62 | 62 | const CQ_VALID_PATRON_PASSWORD = 'CQ'; |
63 | 63 | |
@@ -134,7 +134,7 @@ discard block |
||
134 | 134 | public static function parse($raw): SIP2Response |
135 | 135 | { |
136 | 136 | if (empty($raw) || !self::checkCRC($raw)) { |
137 | - throw new LogicException("Empty string or bad CRC not expected here");//@codeCoverageIgnore |
|
137 | + throw new LogicException("Empty string or bad CRC not expected here"); //@codeCoverageIgnore |
|
138 | 138 | } |
139 | 139 | |
140 | 140 | $type = substr($raw, 0, 2); |
@@ -177,11 +177,11 @@ discard block |
||
177 | 177 | //we tolerate unexpected values and treat them as array types |
178 | 178 | //named after the code if we don't have a definition for it |
179 | 179 | if (!isset(self::$mapCodeToVarDef[$field])) { |
180 | - self::$mapCodeToVarDef[$field]=[ |
|
180 | + self::$mapCodeToVarDef[$field] = [ |
|
181 | 181 | 'name' => $field, |
182 | 182 | 'type' => 'array' |
183 | 183 | ]; |
184 | - $name=$field; |
|
184 | + $name = $field; |
|
185 | 185 | } else { |
186 | 186 | $name = self::$mapCodeToVarDef[$field]['name']; |
187 | 187 | } |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * the parsed array. Orig values will remain in ['raw'] element |
194 | 194 | */ |
195 | 195 | $clean = trim($value, "\x00..\x1F"); |
196 | - if ($clean!='') { |
|
196 | + if ($clean != '') { |
|
197 | 197 | $name = self::$mapCodeToVarDef[$field]['name']; |
198 | 198 | $this->addVariable($name, $clean); |
199 | 199 | } |
@@ -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, |
@@ -27,7 +27,7 @@ |
||
27 | 27 | ]; |
28 | 28 | |
29 | 29 | //variable part of the response allowed to contain these... |
30 | - protected $allowedVariables=[ |
|
30 | + protected $allowedVariables = [ |
|
31 | 31 | self::AO_INSTITUTION_ID, |
32 | 32 | self::AA_PATRON_IDENTIFIER, |
33 | 33 | self::AE_PERSONAL_NAME, |
@@ -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, |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | * @var array provides a list of the variables this message can use. Array key is the variable name in |
11 | 11 | * StudlyCaps, value is an array which can contain type, default values |
12 | 12 | */ |
13 | - protected $var=[]; |
|
13 | + protected $var = []; |
|
14 | 14 | |
15 | 15 | /** @var integer|null current timestamp, useful for testing */ |
16 | 16 | protected $timestamp = null; |
@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | |
48 | 48 | public function getAll() |
49 | 49 | { |
50 | - $result=[]; |
|
50 | + $result = []; |
|
51 | 51 | foreach ($this->var as $name => $data) { |
52 | 52 | $result[$name] = $this->getVariable($name); |
53 | 53 | } |
@@ -131,19 +131,19 @@ discard block |
||
131 | 131 | protected function ensureVariableExists($name) |
132 | 132 | { |
133 | 133 | if (!isset($this->var[$name])) { |
134 | - throw new LogicException(get_class($this) . ' has no ' . $name . ' member'); |
|
134 | + throw new LogicException(get_class($this).' has no '.$name.' member'); |
|
135 | 135 | } |
136 | 136 | } |
137 | 137 | |
138 | 138 | protected function handleMissing($varName) |
139 | 139 | { |
140 | - throw new LogicException(get_class($this) . '::set' . $varName . ' must be called'); |
|
140 | + throw new LogicException(get_class($this).'::set'.$varName.' must be called'); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | public function __call($name, $arguments) |
144 | 144 | { |
145 | 145 | if (!preg_match('/^(get|set)(.+)$/', $name, $match)) { |
146 | - throw new LogicException(get_class($this) . ' has no ' . $name . ' method'); |
|
146 | + throw new LogicException(get_class($this).' has no '.$name.' method'); |
|
147 | 147 | } |
148 | 148 | $varName = $match[2]; |
149 | 149 |