@@ -26,11 +26,11 @@ discard block |
||
26 | 26 | const AG_PRINT_LINE = 'AG'; |
27 | 27 | const AH_DUE_DATE = 'AH'; |
28 | 28 | const AJ_TITLE_IDENTIFIER = 'AJ'; |
29 | - const AM_LIBRARY_NAME='AM'; |
|
30 | - const AN_TERMINAL_LOCATION='AN'; |
|
29 | + const AM_LIBRARY_NAME = 'AM'; |
|
30 | + const AN_TERMINAL_LOCATION = 'AN'; |
|
31 | 31 | const AO_INSTITUTION_ID = 'AO'; |
32 | 32 | const AP_CURRENT_LOCATION = 'AP'; |
33 | - const AQ_PERMANENT_LOCATION='AQ'; |
|
33 | + const AQ_PERMANENT_LOCATION = 'AQ'; |
|
34 | 34 | const AS_HOLD_ITEMS = 'AS'; |
35 | 35 | const AT_OVERDUE_ITEMS = 'AT'; |
36 | 36 | const AU_CHARGED_ITEMS = 'AU'; |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | const BF_HOME_PHONE_NUMBER = 'BF'; |
42 | 42 | const BG_OWNER = 'BG'; |
43 | 43 | const BH_CURRENCY_TYPE = 'BH'; |
44 | - const BK_TRANSACTION_ID= 'BK'; |
|
44 | + const BK_TRANSACTION_ID = 'BK'; |
|
45 | 45 | const BL_VALID_PATRON = 'BL'; |
46 | 46 | const BM_RENEWED_ITEMS = 'BM'; |
47 | 47 | const BN_UNRENEWED_ITEMS = 'BN'; |
@@ -51,18 +51,18 @@ discard block |
||
51 | 51 | const BU_RECALL_ITEMS = 'BU'; |
52 | 52 | const BV_FEE_AMOUNT = 'BV'; |
53 | 53 | const BW_EXPIRATION_DATE = 'BW'; |
54 | - const BX_SUPPORTED_MESSAGES='BX'; |
|
54 | + const BX_SUPPORTED_MESSAGES = 'BX'; |
|
55 | 55 | const BZ_HOLD_ITEMS_LIMIT = 'BZ'; |
56 | 56 | const CA_OVERDUE_ITEMS_LIMIT = 'CA'; |
57 | 57 | const CB_CHARGED_ITEMS_LIMIT = 'CB'; |
58 | 58 | const CC_FEE_LIMIT = 'CC'; |
59 | 59 | const CD_UNAVAILABLE_HOLD_ITEMS = 'CD'; |
60 | 60 | const CF_HOLD_QUEUE_LENGTH = 'CF'; |
61 | - const CH_ITEM_PROPERTIES= 'CH'; |
|
61 | + const CH_ITEM_PROPERTIES = 'CH'; |
|
62 | 62 | const CI_SECURITY_INHIBIT = 'CI'; |
63 | 63 | const CJ_RECALL_DATE = 'CJ'; |
64 | - const CK_MEDIA_TYPE= 'CK'; |
|
65 | - const CL_SORT_BIN='CL'; |
|
64 | + const CK_MEDIA_TYPE = 'CK'; |
|
65 | + const CL_SORT_BIN = 'CL'; |
|
66 | 66 | const CM_HOLD_PICKUP_DATE = 'CM'; |
67 | 67 | const CQ_VALID_PATRON_PASSWORD = 'CQ'; |
68 | 68 | |
@@ -139,7 +139,7 @@ discard block |
||
139 | 139 | public static function parse($raw): SIP2Response |
140 | 140 | { |
141 | 141 | if (empty($raw) || !self::checkCRC($raw)) { |
142 | - throw new LogicException("Empty string or bad CRC not expected here");//@codeCoverageIgnore |
|
142 | + throw new LogicException("Empty string or bad CRC not expected here"); //@codeCoverageIgnore |
|
143 | 143 | } |
144 | 144 | |
145 | 145 | $type = substr($raw, 0, 2); |
@@ -159,8 +159,8 @@ discard block |
||
159 | 159 | return true; |
160 | 160 | } |
161 | 161 | if (preg_match('/^(.*AZ)(.{4})$/', trim($raw), $match)) { |
162 | - $plaintext=$match[1]; |
|
163 | - $checksum=$match[2]; |
|
162 | + $plaintext = $match[1]; |
|
163 | + $checksum = $match[2]; |
|
164 | 164 | return self::crc($plaintext) == $checksum; |
165 | 165 | } |
166 | 166 | |
@@ -189,7 +189,7 @@ discard block |
||
189 | 189 | |
190 | 190 | //we ignore anything with no value |
191 | 191 | $clean = trim($value, "\x00..\x1F"); |
192 | - if ($clean==='') { |
|
192 | + if ($clean === '') { |
|
193 | 193 | continue; |
194 | 194 | } |
195 | 195 | |
@@ -200,11 +200,11 @@ discard block |
||
200 | 200 | //we tolerate unexpected values and treat them as array types |
201 | 201 | //named after the code if we don't have a definition for it |
202 | 202 | if (!isset(self::$mapCodeToVarDef[$field])) { |
203 | - self::$mapCodeToVarDef[$field]=[ |
|
203 | + self::$mapCodeToVarDef[$field] = [ |
|
204 | 204 | 'name' => $field, |
205 | 205 | 'type' => 'array' |
206 | 206 | ]; |
207 | - $name=$field; |
|
207 | + $name = $field; |
|
208 | 208 | } else { |
209 | 209 | $name = self::$mapCodeToVarDef[$field]['name']; |
210 | 210 | } |