diff --git a/module/VuFind/src/VuFind/Controller/AbstractRecord.php b/module/VuFind/src/VuFind/Controller/AbstractRecord.php index e46e8a3066d388f2fb7c3def00872392ab3c3e4e..fa7ad12cc4c2e12ccc43495acaa0242da09a21d5 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractRecord.php +++ b/module/VuFind/src/VuFind/Controller/AbstractRecord.php @@ -732,7 +732,7 @@ class AbstractRecord extends AbstractBase $view->backgroundTabs = $this->getBackgroundTabs(); $view->loadInitialTabWithAjax = isset($config->Site->loadInitialTabWithAjax) - ? (bool) $config->Site->loadInitialTabWithAjax : false; + ? (bool)$config->Site->loadInitialTabWithAjax : false; // Set up next/previous record links (if appropriate) if ($this->resultScrollerActive()) { diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php index 2fe683a443ff61a588bcca124a0ebf3b854c7227..1b5e8d5286138a3e69f6ec3c70e7f246492e8479 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php +++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php @@ -694,7 +694,7 @@ class AbstractSearch extends AbstractBase $params->initFromRequest($this->getRequest()->getQuery()); // Get parameters $facet = $this->params()->fromQuery('facet'); - $page = (int) $this->params()->fromQuery('facetpage', 1); + $page = (int)$this->params()->fromQuery('facetpage', 1); $options = $results->getOptions(); $facetSortOptions = $options->getFacetSortOptions(); $sort = $this->params()->fromQuery('facetsort', null); diff --git a/module/VuFind/src/VuFind/Controller/AlphabrowseController.php b/module/VuFind/src/VuFind/Controller/AlphabrowseController.php index de24e2cbb74720a25c5d38e7fe2a8813a4c01ef0..00ffdb22df4b9e6bd5bbf23f72dfbc70d9159c21 100644 --- a/module/VuFind/src/VuFind/Controller/AlphabrowseController.php +++ b/module/VuFind/src/VuFind/Controller/AlphabrowseController.php @@ -86,12 +86,12 @@ class AlphabrowseController extends AbstractBase // Load remaining config parameters $rows_before = isset($config->AlphaBrowse->rows_before) && is_numeric($config->AlphaBrowse->rows_before) - ? (int) $config->AlphaBrowse->rows_before : 0; + ? (int)$config->AlphaBrowse->rows_before : 0; $highlighting = isset($config->AlphaBrowse->highlighting) ? $config->AlphaBrowse->highlighting : false; $limit = isset($config->AlphaBrowse->page_size) && is_numeric($config->AlphaBrowse->page_size) - ? (int) $config->AlphaBrowse->page_size : 20; + ? (int)$config->AlphaBrowse->page_size : 20; // Connect to Solr: $db = $this->serviceLocator->get('VuFind\Search\BackendManager') diff --git a/module/VuFind/src/VuFind/Cover/Generator.php b/module/VuFind/src/VuFind/Cover/Generator.php index 0fd5dacadf97de699c72b5c58baf7d996b3864d3..188e9eaf87e8faa93977e2e7507033eec8a2a7c7 100644 --- a/module/VuFind/src/VuFind/Cover/Generator.php +++ b/module/VuFind/src/VuFind/Cover/Generator.php @@ -138,7 +138,7 @@ class Generator } $default['authorFont'] = $this->fontPath($default['authorFont']); $default['titleFont'] = $this->fontPath($default['titleFont']); - $this->settings = (object) $default; + $this->settings = (object)$default; $this->initImage(); $this->initColors(); } diff --git a/module/VuFind/src/VuFind/Db/Row/User.php b/module/VuFind/src/VuFind/Db/Row/User.php index 7a5c6f56865cde708cecf0c4180f0175ab8f92f8..01df5e29ce86e4e5b28d9f78773aeec34afa07de 100644 --- a/module/VuFind/src/VuFind/Db/Row/User.php +++ b/module/VuFind/src/VuFind/Db/Row/User.php @@ -643,7 +643,7 @@ class User extends RowGateway implements \VuFind\Db\Table\DbTableAwareInterface, { $hash = md5($this->username . $this->password . $this->pass_hash . rand()); // Make totally sure the timestamp is exactly 10 characters: - $time = str_pad(substr((string) time(), 0, 10), 10, '0', STR_PAD_LEFT); + $time = str_pad(substr((string)time(), 0, 10), 10, '0', STR_PAD_LEFT); $this->verify_hash = $hash . $time; return $this->save(); } diff --git a/module/VuFind/src/VuFind/Hierarchy/Driver/AbstractBase.php b/module/VuFind/src/VuFind/Hierarchy/Driver/AbstractBase.php index c11e93d979d2dd2d32f7fc8941dd9b19ed3376b7..93718cb31593850fc4e88e9a92d6f143e1de772c 100644 --- a/module/VuFind/src/VuFind/Hierarchy/Driver/AbstractBase.php +++ b/module/VuFind/src/VuFind/Hierarchy/Driver/AbstractBase.php @@ -96,7 +96,7 @@ abstract class AbstractBase $this->dataManager = $dataManager; $this->rendererManager = $rendererManager; if (isset($options['enabled'])) { - $this->enabled = (bool) $options['enabled']; + $this->enabled = (bool)$options['enabled']; } } diff --git a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php index a98c8bf53907af0bb06f9d5d51197cdfb9e714e1..39528290e7f74403119784f426d98e62d4bdaf1d 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php @@ -486,9 +486,9 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $url = "http://$this->host:$this->dlfport/rest-dlf/" . $path; $url = $this->appendQueryString($url, $params); $result = $this->doHTTPRequest($url, $method, $body); - $replyCode = (string) $result->{'reply-code'}; + $replyCode = (string)$result->{'reply-code'}; if ($replyCode != "0000") { - $replyText = (string) $result->{'reply-text'}; + $replyText = (string)$result->{'reply-text'}; $this->logError( "DLF request failed", [ 'url' => $url, 'reply-code' => $replyCode, @@ -659,11 +659,11 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $temp[] = [ 'id' => $id, 'availability' => $availability, - 'status' => (string) $status[0], - 'location' => (string) $location[0], - 'signature' => (string) $signature[0], + 'status' => (string)$status[0], + 'location' => (string)$location[0], + 'signature' => (string)$signature[0], 'reserve' => $reserve, - 'callnumber' => (string) $signature[0] + 'callnumber' => (string)$signature[0] ]; } $holding[] = $temp; @@ -738,10 +738,10 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, } $xml = $this->doRestDLFRequest(['record', $resource, 'items'], $params); foreach ($xml->{'items'}->{'item'} as $item) { - $item_status = (string) $item->{'z30-item-status-code'}; // $isc + $item_status = (string)$item->{'z30-item-status-code'}; // $isc // $ipsc: - $item_process_status = (string) $item->{'z30-item-process-status-code'}; - $sub_library_code = (string) $item->{'z30-sub-library-code'}; // $slc + $item_process_status = (string)$item->{'z30-item-process-status-code'}; + $sub_library_code = (string)$item->{'z30-sub-library-code'}; // $slc $z30 = $item->z30; if ($this->translator) { $item_status = $this->translator->tab15Translate( @@ -751,8 +751,8 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $item_status = [ 'opac' => 'Y', 'request' => 'C', - 'desc' => (string) $z30->{'z30-item-status'}, - 'sub_lib_desc' => (string) $z30->{'z30-sub-library'} + 'desc' => (string)$z30->{'z30-item-status'}, + 'sub_lib_desc' => (string)$z30->{'z30-sub-library'} ]; } if ($item_status['opac'] != 'Y') { @@ -760,10 +760,10 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, } $availability = false; //$reserve = ($item_status['request'] == 'C')?'N':'Y'; - $collection = (string) $z30->{'z30-collection'}; + $collection = (string)$z30->{'z30-collection'}; $collection_desc = ['desc' => $collection]; if ($this->translator) { - $collection_code = (string) $item->{'z30-collection-code'}; + $collection_code = (string)$item->{'z30-collection-code'}; $collection_desc = $this->translator->tab40Translate( $collection_code, $sub_library_code ); @@ -771,7 +771,7 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $requested = false; $duedate = ''; $addLink = false; - $status = (string) $item->{'status'}; + $status = (string)$item->{'status'}; if (in_array($status, $this->available_statuses)) { $availability = true; } @@ -812,30 +812,30 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, } $item_id = $item->attributes()->href; $item_id = substr($item_id, strrpos($item_id, '/') + 1); - $note = (string) $z30->{'z30-note-opac'}; + $note = (string)$z30->{'z30-note-opac'}; $holding[] = [ 'id' => $id, 'item_id' => $item_id, 'availability' => $availability, - 'status' => (string) $item_status['desc'], + 'status' => (string)$item_status['desc'], 'location' => $sub_library_code, 'reserve' => 'N', - 'callnumber' => (string) $z30->{'z30-call-no'}, - 'duedate' => (string) $duedate, - 'number' => (string) $z30->{'z30-inventory-number'}, - 'barcode' => (string) $z30->{'z30-barcode'}, - 'description' => (string) $z30->{'z30-description'}, + 'callnumber' => (string)$z30->{'z30-call-no'}, + 'duedate' => (string)$duedate, + 'number' => (string)$z30->{'z30-inventory-number'}, + 'barcode' => (string)$z30->{'z30-barcode'}, + 'description' => (string)$z30->{'z30-description'}, 'notes' => ($note == null) ? null : [$note], 'is_holdable' => true, 'addLink' => $addLink, 'holdtype' => 'hold', /* below are optional attributes*/ - 'collection' => (string) $collection, - 'collection_desc' => (string) $collection_desc['desc'], - 'callnumber_second' => (string) $z30->{'z30-call-no-2'}, - 'sub_lib_desc' => (string) $item_status['sub_lib_desc'], - 'no_of_loans' => (string) $z30->{'$no_of_loans'}, - 'requested' => (string) $requested + 'collection' => (string)$collection, + 'collection_desc' => (string)$collection_desc['desc'], + 'callnumber_second' => (string)$z30->{'z30-call-no-2'}, + 'sub_lib_desc' => (string)$item_status['sub_lib_desc'], + 'no_of_loans' => (string)$z30->{'$no_of_loans'}, + 'requested' => (string)$requested ]; } return $holding; @@ -890,22 +890,22 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, //$docno = (string) $z36->{'z36-doc-number'}; //$itemseq = (string) $z36->{'z36-item-sequence'}; //$seq = (string) $z36->{'z36-sequence'}; - $location = (string) $z36->{'z36_pickup_location'}; - $reqnum = (string) $z36->{'z36-doc-number'} - . (string) $z36->{'z36-item-sequence'} - . (string) $z36->{'z36-sequence'}; + $location = (string)$z36->{'z36_pickup_location'}; + $reqnum = (string)$z36->{'z36-doc-number'} + . (string)$z36->{'z36-item-sequence'} + . (string)$z36->{'z36-sequence'}; $due = $returned = null; if ($history) { $due = $item->z36h->{'z36h-due-date'}; $returned = $item->z36h->{'z36h-returned-date'}; } else { - $due = (string) $z36->{'z36-due-date'}; + $due = (string)$z36->{'z36-due-date'}; } //$loaned = (string) $z36->{'z36-loan-date'}; - $title = (string) $z13->{'z13-title'}; - $author = (string) $z13->{'z13-author'}; - $isbn = (string) $z13->{'z13-isbn-issn'}; - $barcode = (string) $z30->{'z30-barcode'}; + $title = (string)$z13->{'z13-title'}; + $author = (string)$z13->{'z13-author'}; + $isbn = (string)$z13->{'z13-isbn-issn'}; + $barcode = (string)$z30->{'z30-barcode'}; $transList[] = [ //'type' => $type, 'id' => ($history) ? null : $this->barcodeToID($barcode), @@ -1003,23 +1003,23 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $delete = $item->xpath('@delete'); $href = $item->xpath('@href'); $item_id = substr($href[0], strrpos($href[0], '/') + 1); - if ((string) $z37->{'z37-request-type'} == "Hold Request" || true) { + if ((string)$z37->{'z37-request-type'} == "Hold Request" || true) { $type = "hold"; //$docno = (string) $z37->{'z37-doc-number'}; //$itemseq = (string) $z37->{'z37-item-sequence'}; - $seq = (string) $z37->{'z37-sequence'}; - $location = (string) $z37->{'z37-pickup-location'}; - $reqnum = (string) $z37->{'z37-doc-number'} - . (string) $z37->{'z37-item-sequence'} - . (string) $z37->{'z37-sequence'}; - $expire = (string) $z37->{'z37-end-request-date'}; - $create = (string) $z37->{'z37-open-date'}; - $holddate = (string) $z37->{'z37-hold-date'}; - $title = (string) $z13->{'z13-title'}; - $author = (string) $z13->{'z13-author'}; - $isbn = (string) $z13->{'z13-isbn-issn'}; - $barcode = (string) $z30->{'z30-barcode'}; - $status = (string) $z37->{'z37-status'}; + $seq = (string)$z37->{'z37-sequence'}; + $location = (string)$z37->{'z37-pickup-location'}; + $reqnum = (string)$z37->{'z37-doc-number'} + . (string)$z37->{'z37-item-sequence'} + . (string)$z37->{'z37-sequence'}; + $expire = (string)$z37->{'z37-end-request-date'}; + $create = (string)$z37->{'z37-open-date'}; + $holddate = (string)$z37->{'z37-hold-date'}; + $title = (string)$z13->{'z13-title'}; + $author = (string)$z13->{'z13-author'}; + $isbn = (string)$z13->{'z13-isbn-issn'}; + $barcode = (string)$z30->{'z30-barcode'}; + $status = (string)$z37->{'z37-status'}; if ($holddate == "00000000") { $holddate = null; } else { @@ -1096,7 +1096,7 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, } $statuses[$id] = [ 'success' => false, 'status' => 'cancel_hold_failed', - 'sysMessage' => (string) $message + 'sysMessage' => (string)$message ]; } else { $count++; @@ -1134,18 +1134,18 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $z13 = $item->z13; $z30 = $item->z30; //$delete = $item->xpath('@delete'); - $title = (string) $z13->{'z13-title'}; - $transactiondate = date('d-m-Y', strtotime((string) $z31->{'z31-date'})); - $transactiontype = (string) $z31->{'z31-credit-debit'}; - $id = (string) $z13->{'z13-doc-number'}; - $barcode = (string) $z30->{'z30-barcode'}; - $checkout = (string) $z31->{'z31-date'}; + $title = (string)$z13->{'z13-title'}; + $transactiondate = date('d-m-Y', strtotime((string)$z31->{'z31-date'})); + $transactiontype = (string)$z31->{'z31-credit-debit'}; + $id = (string)$z13->{'z13-doc-number'}; + $barcode = (string)$z30->{'z30-barcode'}; + $checkout = (string)$z31->{'z31-date'}; $id = $this->barcodeToID($barcode); $mult = ($transactiontype == "Credit") ? 100 : -100; $amount - = (float)(preg_replace("/[\(\)]/", "", (string) $z31->{'z31-sum'})) + = (float)(preg_replace("/[\(\)]/", "", (string)$z31->{'z31-sum'})) * $mult; - $cashref = (string) $z31->{'z31-sequence'}; + $cashref = (string)$z31->{'z31-sequence'}; //$cashdate = date('d-m-Y', strtotime((string) $z31->{'z31-date'})); $balance = 0; @@ -1225,17 +1225,17 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, 'library' => $user['college'], 'bor_id' => $user['id'] ], true ); - $id = (string) $xml->z303->{'z303-id'}; - $address1 = (string) $xml->z304->{'z304-address-2'}; - $address2 = (string) $xml->z304->{'z304-address-3'}; - $zip = (string) $xml->z304->{'z304-zip'}; - $phone = (string) $xml->z304->{'z304-telephone'}; - $barcode = (string) $xml->z304->{'z304-address-0'}; - $group = (string) $xml->z305->{'z305-bor-status'}; - $expiry = (string) $xml->z305->{'z305-expiry-date'}; - $credit_sum = (string) $xml->z305->{'z305-sum'}; - $credit_sign = (string) $xml->z305->{'z305-credit-debit'}; - $name = (string) $xml->z303->{'z303-name'}; + $id = (string)$xml->z303->{'z303-id'}; + $address1 = (string)$xml->z304->{'z304-address-2'}; + $address2 = (string)$xml->z304->{'z304-address-3'}; + $zip = (string)$xml->z304->{'z304-zip'}; + $phone = (string)$xml->z304->{'z304-telephone'}; + $barcode = (string)$xml->z304->{'z304-address-0'}; + $group = (string)$xml->z305->{'z305-bor-status'}; + $expiry = (string)$xml->z305->{'z305-expiry-date'}; + $credit_sum = (string)$xml->z305->{'z305-sum'}; + $credit_sign = (string)$xml->z305->{'z305-credit-debit'}; + $name = (string)$xml->z303->{'z303-name'}; if (strstr($name, ",")) { list($lastname, $firstname) = explode(",", $name); } else { @@ -1367,13 +1367,13 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $patron['college'] = $this->sublibadm["$home_lib"]; } } - $patron['id'] = (string) $id; - $patron['barcode'] = (string) $user; - $patron['firstname'] = (string) $firstName; - $patron['lastname'] = (string) $lastName; - $patron['cat_username'] = (string) $user; + $patron['id'] = (string)$id; + $patron['barcode'] = (string)$user; + $patron['firstname'] = (string)$firstName; + $patron['lastname'] = (string)$lastName; + $patron['cat_username'] = (string)$user; $patron['cat_password'] = $password; - $patron['email'] = (string) $email_addr; + $patron['email'] = (string)$email_addr; $patron['major'] = null; return $patron; } @@ -1399,8 +1399,8 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, if ($part) { foreach ($part[0]->children() as $node) { $arr = $node->attributes(); - $code = (string) $arr['code']; - $loc_name = (string) $node; + $code = (string)$arr['code']; + $loc_name = (string)$node; $locations[$code] = $loc_name; } } else { @@ -1539,9 +1539,9 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $xml = $this->doXRequest( "find", ["base" => $base, "request" => "BAR=$bar"], false ); - $docs = (int) $xml->{"no_records"}; + $docs = (int)$xml->{"no_records"}; if ($docs == 1) { - $set = (string) $xml->{"set_number"}; + $set = (string)$xml->{"set_number"}; $result = $this->doXRequest( "present", ["set_number" => $set, "set_entry" => "1"], false diff --git a/module/VuFind/src/VuFind/ILS/Driver/DAIA.php b/module/VuFind/src/VuFind/ILS/Driver/DAIA.php index 4a8d32ac718cda784c5ad386b402e74ba487acb8..bc3f4119684d949b924142f7a79283d1162a5331 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/DAIA.php +++ b/module/VuFind/src/VuFind/ILS/Driver/DAIA.php @@ -1305,7 +1305,7 @@ class DAIA extends AbstractBase implements foreach ($messages as $message) { if (isset($message['content'])) { $this->debug( - 'Message in DAIA response (' . (string) $context . '): ' . + 'Message in DAIA response (' . (string)$context . '): ' . $message['content'] ); } diff --git a/module/VuFind/src/VuFind/ILS/Driver/Demo.php b/module/VuFind/src/VuFind/ILS/Driver/Demo.php index b7b5761a0ed1a66b9e11a6b204fcfa06105cd4bb..7eff55fd767a7f79f2547bd507fbc36f3a06e57c 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Demo.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Demo.php @@ -211,7 +211,7 @@ class Demo extends AbstractBase { // Load service configuration; return empty array if no services defined. $services = isset($this->config['Records']['services']) - ? (array) $this->config['Records']['services'] + ? (array)$this->config['Records']['services'] : []; if (empty($services)) { return []; @@ -219,7 +219,7 @@ class Demo extends AbstractBase // Make it more likely we have a single service than many: $count = rand(1, 5) == 1 ? rand(1, count($services)) : 1; - $keys = (array) array_rand($services, $count); + $keys = (array)array_rand($services, $count); $fakeServices = []; foreach ($keys as $key) { @@ -534,7 +534,7 @@ class Demo extends AbstractBase */ protected function getSimulatedStatus($id, array $patron = null) { - $id = (string) $id; + $id = (string)$id; // Do we have a fake status persisted in the session? $session = $this->getSession(); diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php index b2721d75bc485e9e94ee5d18508ef17ead8bbad1..bfeaa40a1409de33c2e0260d9288d73bafc73918 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php +++ b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php @@ -315,8 +315,8 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements */ protected function getField($contents, $default = "Unknown") { - if ((string) $contents != "") { - return (string) $contents; + if ((string)$contents != "") { + return (string)$contents; } else { return $default; } @@ -915,7 +915,7 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements } $holding[] = [ 'id' => $id, - 'availability' => (string) $available, + 'availability' => (string)$available, 'item_id' => $rowItem['ITEMNO'], 'status' => $status, 'location' => $loc, @@ -929,7 +929,7 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements ((null == $rowItem['CALLNO']) || ($rowItem['DOCTYPE'] == "PE")) ? '' : $rowItem['CALLNO'], 'duedate' => ($onTransfer || $waiting) - ? '' : (string) $duedate_formatted, + ? '' : (string)$duedate_formatted, 'barcode' => (null == $rowItem['BARCODE']) ? 'Unknown' : $rowItem['BARCODE'], 'number' => (null == $rowItem['COPYNO']) diff --git a/module/VuFind/src/VuFind/ILS/Driver/Sierra.php b/module/VuFind/src/VuFind/ILS/Driver/Sierra.php index c14a819ff18e1036de28604a52a0a1b2a3d51d7b..beee4be0799a87de6c26011a82663c87763e8902 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Sierra.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Sierra.php @@ -569,7 +569,7 @@ class Sierra extends AbstractBase implements TranslatorAwareInterface try { $newItems = []; $offset = $limit * ($page - 1); - $daysOld = (int) $daysOld; + $daysOld = (int)$daysOld; if (is_int($daysOld) == false || $daysOld > 30) { $daysOld = "30"; } @@ -607,7 +607,7 @@ class Sierra extends AbstractBase implements TranslatorAwareInterface $this->db, $query, [$limit, $offset] ); } - $newItems['count'] = (string) pg_num_rows($results); + $newItems['count'] = (string)pg_num_rows($results); if (pg_num_rows($results) != 0) { while ($record = pg_fetch_row($results)) { $bareNumber = $record[0]; diff --git a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php index b3e9ab0a1e219c86d1682dc45a7c35aedce1c77b..c756ab77d4e8486afe414d219216f6197210c12f 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php @@ -1382,7 +1382,7 @@ class Unicorn extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf } $linking = $linking[0]; - if (array_key_exists((int) $linking, $textuals)) { + if (array_key_exists((int)$linking, $textuals)) { // Skip coded holdings overridden by textual // holdings continue; @@ -1396,7 +1396,7 @@ class Unicorn extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf $decoded_holding .= ' ' . $subfield->getData(); } - $ndx = (int) ($linking + $ndx = (int)($linking . sprintf("%0{$link_digits}u", $sequence)); $holdings[$ndx] = trim($decoded_holding); } @@ -1407,7 +1407,7 @@ class Unicorn extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf $textual_holding .= ' ' . $note->getData(); } - $ndx = (int) ($linking . sprintf("%0{$link_digits}u", 0)); + $ndx = (int)($linking . sprintf("%0{$link_digits}u", 0)); $holdings[$ndx] = trim($textual_holding); } diff --git a/module/VuFind/src/VuFind/Log/Logger.php b/module/VuFind/src/VuFind/Log/Logger.php index 2dacb655f4b9a61444031d7f24e3b6ffa8269469..6fe83aa14946851b1e63b266c169493de8156d98 100644 --- a/module/VuFind/src/VuFind/Log/Logger.php +++ b/module/VuFind/src/VuFind/Log/Logger.php @@ -83,7 +83,7 @@ class Logger extends BaseLogger $writer->write( [ 'timestamp' => $timestamp, - 'priority' => (int) $priority, + 'priority' => (int)$priority, 'priorityName' => $this->priorities[$priority], 'message' => $message, 'extra' => $extra diff --git a/module/VuFind/src/VuFind/RecordDriver/EIT.php b/module/VuFind/src/VuFind/RecordDriver/EIT.php index 34ab2bf3a2fa9a7deecda9c2432735cc5356c197..2a117c483572e37372c3e1d36461e9d0a6cd3f88 100644 --- a/module/VuFind/src/VuFind/RecordDriver/EIT.php +++ b/module/VuFind/src/VuFind/RecordDriver/EIT.php @@ -66,7 +66,7 @@ class EIT extends SolrDefault public function setRawData($data) { // Easy way to recursively convert a SimpleXML Object to an array - $data = json_decode(json_encode((array) $data), 1); + $data = json_decode(json_encode((array)$data), 1); if (isset($data['fields'])) { $this->fields = $data['fields']; } else { diff --git a/module/VuFind/src/VuFind/RecordDriver/Pazpar2.php b/module/VuFind/src/VuFind/RecordDriver/Pazpar2.php index c630c4b8d8609721f551a5edd1eb60efd4bcf4e1..b39f550273f2c300678cfd069dab01790721b150 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Pazpar2.php +++ b/module/VuFind/src/VuFind/RecordDriver/Pazpar2.php @@ -77,15 +77,15 @@ class Pazpar2 extends SolrDefault if (count($data->attributes()) > 0) { $children['_attr_'] = []; foreach ($data->attributes() as $name => $attr) { - $children['_attr_'][$name] = (string) $attr; + $children['_attr_'][$name] = (string)$attr; } } // If there's no children, we're at data if ($data->count() == 0) { if (!isset($children['_attr_'])) { - $children = (string) $data; // Flatten + $children = (string)$data; // Flatten } else { - $children[$key] = (string) $data; + $children[$key] = (string)$data; } } else { // If there's children, recurse on this XML @@ -112,7 +112,7 @@ class Pazpar2 extends SolrDefault if (count($xml->attributes()) > 0) { $array['_attr_'] = []; foreach ($xml->attributes() as $key => $attr) { - $array['_attr_'][$key] = (string) $attr; + $array['_attr_'][$key] = (string)$attr; } } return $array; @@ -222,7 +222,7 @@ class Pazpar2 extends SolrDefault function ($url) { return ['url' => $url]; }, - (array) $this->pz2fields['location']['md-electronic-url'] + (array)$this->pz2fields['location']['md-electronic-url'] ); } return []; diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php index 5ce77e09ce29827af5445bb739b9c4ef06356dd2..ee7b0724e48d96d730a3d3e7f883bd99dec0883c 100644 --- a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php +++ b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php @@ -1080,7 +1080,7 @@ class SolrDefault extends AbstractBase public function getPrimaryAuthors() { return isset($this->fields['author']) - ? (array) $this->fields['author'] : []; + ? (array)$this->fields['author'] : []; } /** diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Backend.php index 6fb0796bee8fc7fd1c05f638ed0079245150ddd4..feb22632ecbfde99a1df7e871b6a3d86ca86aeec 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Backend.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Backend.php @@ -263,6 +263,6 @@ class Backend extends AbstractBackend protected function getSearchProgress() { $statResponse = $this->connector->stat(); - return (float) $statResponse->progress; + return (float)$statResponse->progress; } } diff --git a/module/VuFindTheme/src/VuFindTheme/ThemeInfo.php b/module/VuFindTheme/src/VuFindTheme/ThemeInfo.php index 70f76d5141490e44bfa420fba89677fbbbb641a2..5652ebfaeed30aabd14e42d457b9d315b7860169 100644 --- a/module/VuFindTheme/src/VuFindTheme/ThemeInfo.php +++ b/module/VuFindTheme/src/VuFindTheme/ThemeInfo.php @@ -212,7 +212,7 @@ class ThemeInfo while (!empty($currentTheme)) { $currentThemeSet = array_merge( - (array) $currentTheme, + (array)$currentTheme, isset($allThemeInfo[$currentTheme]['mixins']) ? $allThemeInfo[$currentTheme]['mixins'] : [] );