diff --git a/module/VuFind/src/VuFind/Controller/CombinedController.php b/module/VuFind/src/VuFind/Controller/CombinedController.php index c54d9b8b066682e5f78832f2f7ac365c4583b323..9caa23b02a00bbb5f0e1393ae05cf3064b4ceb9e 100644 --- a/module/VuFind/src/VuFind/Controller/CombinedController.php +++ b/module/VuFind/src/VuFind/Controller/CombinedController.php @@ -209,8 +209,7 @@ class CombinedController extends AbstractSearch 'results' => $results, 'supportsCart' => $supportsCart, 'supportsCartOptions' => $supportsCartOptions, - 'showBulkOptions' => isset($settings->Site->showBulkOptions) - && $settings->Site->showBulkOptions + 'showBulkOptions' => $settings->Site->showBulkOptions ?? false ] ); } diff --git a/module/VuFind/src/VuFind/Hierarchy/Driver/ConfigurationBasedFactory.php b/module/VuFind/src/VuFind/Hierarchy/Driver/ConfigurationBasedFactory.php index e0a28567c6c0b63f5ff55ecd565bf4d2a64afae4..4a55c3fcb38927fb63400ebdec51af963b2db2ff 100644 --- a/module/VuFind/src/VuFind/Hierarchy/Driver/ConfigurationBasedFactory.php +++ b/module/VuFind/src/VuFind/Hierarchy/Driver/ConfigurationBasedFactory.php @@ -68,8 +68,7 @@ class ConfigurationBasedFactory $configReader = $sm->get('VuFind\Config\PluginManager'); $globalConfig = $configReader->get('config'); $options = [ - 'enabled' => isset($globalConfig->Hierarchy->showTree) - ? $globalConfig->Hierarchy->showTree : false + 'enabled' => $globalConfig->Hierarchy->showTree ?? false ]; // Load driver-specific configuration: diff --git a/module/VuFind/src/VuFind/ILS/Driver/NoILS.php b/module/VuFind/src/VuFind/ILS/Driver/NoILS.php index 9b84fd5587dc9eb97c340a6ee7b4c91705417149..2a82ba87d0846bfca6a1dc3c826ae0fbffe04e73 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/NoILS.php +++ b/module/VuFind/src/VuFind/ILS/Driver/NoILS.php @@ -225,10 +225,8 @@ class NoILS extends AbstractBase implements TranslatorAwareInterface $this->config['Holdings']['callnumber'] ), 'barcode' => $this->config['Holdings']['barcode'], - 'notes' => isset($this->config['Holdings']['notes']) - ? $this->config['Holdings']['notes'] : [], - 'summary' => isset($this->config['Holdings']['summary']) - ? $this->config['Holdings']['summary'] : [] + 'notes' => $this->config['Holdings']['notes'] ?? [], + 'summary' => $this->config['Holdings']['summary'] ?? [] ] ]; } elseif ($useHoldings == "marc") { diff --git a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php index 2970f93f91b727c0e3c1d3b1c34928ef0782672c..153fb4691b4b3d6324f988adb538677880aaf8ef 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php @@ -1369,18 +1369,12 @@ class Symphony extends AbstractBase implements LoggerAwareInterface foreach ($fees as $fee) { $fineList[] = [ 'amount' => $fee->amount->_ * 100, - 'checkout' => - isset($fee->feeItemInfo->checkoutDate) ? - $fee->feeItemInfo->checkoutDate : null, + 'checkout' => $fee->feeItemInfo->checkoutDate ?? null, 'fine' => $fee->billReasonDescription, 'balance' => $fee->amountOutstanding->_ * 100, - 'createdate' => - isset($fee->dateBilled) ? $fee->dateBilled : null, - 'duedate' => - isset($fee->feeItemInfo->dueDate) ? - $fee->feeItemInfo->dueDate : null, - 'id' => isset($fee->feeItemInfo->titleKey) ? - $fee->feeItemInfo->titleKey : null + 'createdate' => $fee->dateBilled ?? null, + 'duedate' => $fee->feeItemInfo->dueDate ?? null, + 'id' => $fee->feeItemInfo->titleKey ?? null ]; } } diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Factory.php b/module/VuFind/src/VuFind/View/Helper/Root/Factory.php index 95143e45cbedbf3a4dfbac3ae9b54d0afc564757..a92deba34c86b0aa1141e04ef23b53bed8f95305 100644 --- a/module/VuFind/src/VuFind/View/Helper/Root/Factory.php +++ b/module/VuFind/src/VuFind/View/Helper/Root/Factory.php @@ -267,13 +267,10 @@ class Factory $config = $sm->get('VuFind\Config\PluginManager')->get('config'); $url = isset($config->Piwik->url) ? $config->Piwik->url : false; $options = [ - 'siteId' => isset($config->Piwik->site_id) ? $config->Piwik->site_id : 1, - 'searchPrefix' => isset($config->Piwik->searchPrefix) - ? $config->Piwik->searchPrefix : null + 'siteId' => $config->Piwik->site_id ?? 1, + 'searchPrefix' => $config->Piwik->searchPrefix ?? null ]; - $customVars = isset($config->Piwik->custom_variables) - ? $config->Piwik->custom_variables - : false; + $customVars = $config->Piwik->custom_variables ?? false; $request = $sm->get('Request'); $router = $sm->get('Router'); return new Piwik($url, $options, $customVars, $router, $request); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php index 6b08713fcd3b74f3830b4d7e0d95183dbe690bbf..6101c590cf87d886b9eae23a820c6d24413bdcf1 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Connector.php @@ -164,7 +164,7 @@ class Connector extends \VuFindSearch\Backend\SRU\Connector return [ 'docs' => $finalDocs, 'offset' => $offset, - 'total' => isset($xml->numberOfRecords) ? (int)$xml->numberOfRecords : 0 + 'total' => (int) ($xml->numberOfRecords ?? 0) ]; } }