diff --git a/module/VuFind/src/VuFind/Auth/Manager.php b/module/VuFind/src/VuFind/Auth/Manager.php
index 13b5af57a1dc445c4107b3a590d93462cb10871e..6cdb99db33ae0781256269919fd42d6cc19a4605 100644
--- a/module/VuFind/src/VuFind/Auth/Manager.php
+++ b/module/VuFind/src/VuFind/Auth/Manager.php
@@ -427,7 +427,7 @@ class Manager implements \ZfcRbac\Identity\IdentityProviderInterface
                     ->select(['id' => $this->session->userId]);
                 $this->currentUser = count($results) < 1
                     ? false : $results->current();
-            } else if (isset($this->session->userDetails)) {
+            } elseif (isset($this->session->userDetails)) {
                 // privacy mode
                 $results = $this->userTable->createRow();
                 $results->exchangeArray($this->session->userDetails);
diff --git a/module/VuFind/src/VuFind/Autocomplete/PluginManager.php b/module/VuFind/src/VuFind/Autocomplete/PluginManager.php
index ceffd0844121e342fc6ef92e290483e23887f452..089f4b6f70f77e774b02d5fa175fca5892afd8ac 100644
--- a/module/VuFind/src/VuFind/Autocomplete/PluginManager.php
+++ b/module/VuFind/src/VuFind/Autocomplete/PluginManager.php
@@ -88,7 +88,7 @@ class PluginManager extends \VuFind\ServiceManager\AbstractPluginManager
         // Figure out which handler to use:
         if (!empty($type) && isset($types[$type])) {
             $module = $types[$type];
-        } else if (isset($config->Autocomplete->default_handler)) {
+        } elseif (isset($config->Autocomplete->default_handler)) {
             $module = $config->Autocomplete->default_handler;
         } else {
             $module = false;
diff --git a/module/VuFind/src/VuFind/Cache/Manager.php b/module/VuFind/src/VuFind/Cache/Manager.php
index 4fe3d96483fbd09d3ec00f6bc32f528b94e6414c..1f2f1630736fce4bc16c8ce967e6a67158f0c3f6 100644
--- a/module/VuFind/src/VuFind/Cache/Manager.php
+++ b/module/VuFind/src/VuFind/Cache/Manager.php
@@ -160,7 +160,7 @@ class Manager
 
         if (strlen(LOCAL_CACHE_DIR) > 0) {
             $dir = LOCAL_CACHE_DIR . '/';
-        } else if (strlen(LOCAL_OVERRIDE_DIR) > 0) {
+        } elseif (strlen(LOCAL_OVERRIDE_DIR) > 0) {
             $dir = LOCAL_OVERRIDE_DIR . '/cache/';
         } else {
             $dir = APPLICATION_PATH . '/data/cache/';
diff --git a/module/VuFind/src/VuFind/Config/Upgrade.php b/module/VuFind/src/VuFind/Config/Upgrade.php
index e86793ae3a38c2fb3daf68b8fecad84f6499035c..d3ea18db94266ac174d16699f594d7b825194454 100644
--- a/module/VuFind/src/VuFind/Config/Upgrade.php
+++ b/module/VuFind/src/VuFind/Config/Upgrade.php
@@ -477,13 +477,13 @@ class Upgrade
         $from = (float)$this->from;
         if ($from >= 2.4) {
             $default = 'MARC:MARCXML:EndNote:EndNoteWeb:RefWorks:BibTeX:RIS';
-        } else if ($from >= 2.0) {
+        } elseif ($from >= 2.0) {
             $default = 'MARC:MARCXML:EndNote:EndNoteWeb:RefWorks:BibTeX';
-        } else if ($from >= 1.4) {
+        } elseif ($from >= 1.4) {
             $default = 'MARC:MARCXML:EndNote:RefWorks:BibTeX';
-        } else if ($from >= 1.3) {
+        } elseif ($from >= 1.3) {
             $default = 'MARC:EndNote:RefWorks:BibTeX';
-        } else if ($from >= 1.2) {
+        } elseif ($from >= 1.2) {
             $default = 'MARC:EndNote:BibTeX';
         } else {
             $default = 'MARC:EndNote';
@@ -1023,7 +1023,7 @@ class Upgrade
             $cfg = & $this->newConfigs['Summon.ini']['Advanced_Facet_Settings'];
             if (!isset($cfg['special_facets']) || empty($cfg['special_facets'])) {
                 $cfg['special_facets'] = 'checkboxes:Summon';
-            } else if (false === strpos('checkboxes', $cfg['special_facets'])) {
+            } elseif (false === strpos('checkboxes', $cfg['special_facets'])) {
                 $cfg['special_facets'] .= ',checkboxes:Summon';
             }
         }
@@ -1316,9 +1316,9 @@ class Upgrade
             ? $this->newConfigs['config.ini']['Catalog']['driver'] : '';
         if (empty($driver)) {
             $this->addWarning("WARNING: Could not find ILS driver setting.");
-        } else if ('Sample' == $driver) {
+        } elseif ('Sample' == $driver) {
             // No configuration file for Sample driver
-        } else if (!file_exists($this->oldDir . '/' . $driver . '.ini')) {
+        } elseif (!file_exists($this->oldDir . '/' . $driver . '.ini')) {
             $this->addWarning(
                 "WARNING: Could not find {$driver}.ini file; "
                 . "check your ILS driver configuration."
@@ -1431,7 +1431,7 @@ class Upgrade
             // string. Note that we treat blank lines as comments.
             if (substr($trimmed, 0, 1) == ';' || empty($trimmed)) {
                 $comments .= $line;
-            } else if (substr($trimmed, 0, 1) == '['
+            } elseif (substr($trimmed, 0, 1) == '['
                 && ($closeBracket = strpos($trimmed, ']')) > 1
             ) {
                 // Is the current line the start of a section?  If so, create the
@@ -1450,7 +1450,7 @@ class Upgrade
                         'settings' => []];
                     $comments = '';
                 }
-            } else if (($equals = strpos($trimmed, '=')) !== false) {
+            } elseif (($equals = strpos($trimmed, '=')) !== false) {
                 // Is the current line a setting?  If so, add to the return value:
                 $set = trim(substr($trimmed, 0, $equals));
                 $set = trim(str_replace('[]', '', $set));
diff --git a/module/VuFind/src/VuFind/Config/Writer.php b/module/VuFind/src/VuFind/Config/Writer.php
index dc56420cf43ba1ff3dda51e543e59a3c167f0e0b..15c06a9f59fe93be8da59d0544320504c05d5c89 100644
--- a/module/VuFind/src/VuFind/Config/Writer.php
+++ b/module/VuFind/src/VuFind/Config/Writer.php
@@ -72,7 +72,7 @@ class Writer
             if (false === $this->content) {
                 throw new \Exception('Could not read ' . $filename);
             }
-        } else if (is_array($content)) {
+        } elseif (is_array($content)) {
             $this->content = $this->buildContent($content, $comments);
         } else {
             $this->content = $content;
@@ -117,7 +117,7 @@ class Writer
                     $settingSet = true;
                 }
                 $currentSection = $matches[1];
-            } else if (strstr($content, '=')) {
+            } elseif (strstr($content, '=')) {
                 $contentParts = explode('=', $content, 2);
                 $key = trim($contentParts[0]);
                 // If the key we are trying to set is already present as an array,
@@ -212,9 +212,9 @@ class Writer
     {
         if ($e === true) {
             return 'true';
-        } else if ($e === false) {
+        } elseif ($e === false) {
             return 'false';
-        } else if ($e == "") {
+        } elseif ($e == "") {
             return '';
         } else {
             return '"' . str_replace('"', '\"', $e) . '"';
diff --git a/module/VuFind/src/VuFind/Connection/WorldCatUtils.php b/module/VuFind/src/VuFind/Connection/WorldCatUtils.php
index 40779c952656469378459cbb3f51d31fcc63f0b8..65b0fdd0d842162ea10699047f200efc52b355d1 100644
--- a/module/VuFind/src/VuFind/Connection/WorldCatUtils.php
+++ b/module/VuFind/src/VuFind/Connection/WorldCatUtils.php
@@ -167,7 +167,7 @@ class WorldCatUtils implements \Zend\Log\LoggerAwareInterface
                 // Is the first name empty?  If so, save this there.
                 if (empty($first)) {
                     $first = $current;
-                } else if (strlen($current) > 2 || empty($last)) {
+                } elseif (strlen($current) > 2 || empty($last)) {
                     // If this isn't the first name, we always want to save it as the
                     // last name UNLESS it's an initial, in which case we'll only
                     // save it if we don't already have something better!
@@ -180,7 +180,7 @@ class WorldCatUtils implements \Zend\Log\LoggerAwareInterface
         // based on whether we found a first name only or both first and last names:
         if (empty($first) && empty($last)) {
             return false;
-        } else if (empty($last)) {
+        } elseif (empty($last)) {
             return "local.PersonalName=\"{$first}\"";
         } else {
             return "local.PersonalName=\"{$last}\" "
diff --git a/module/VuFind/src/VuFind/Controller/AbstractBase.php b/module/VuFind/src/VuFind/Controller/AbstractBase.php
index 1236a31c84ca66ddb3b71becab7967dcf7418041..b025d76c284aef6518c475d0e375a8bf8510f93b 100644
--- a/module/VuFind/src/VuFind/Controller/AbstractBase.php
+++ b/module/VuFind/src/VuFind/Controller/AbstractBase.php
@@ -183,7 +183,7 @@ class AbstractBase extends AbstractActionController
             ) {
                 $view->userEmailInFrom = true;
                 $view->from = $user->email;
-            } else if (isset($config->Mail->default_from)
+            } elseif (isset($config->Mail->default_from)
                 && $config->Mail->default_from
             ) {
                 $view->from = $config->Mail->default_from;
diff --git a/module/VuFind/src/VuFind/Controller/AbstractRecord.php b/module/VuFind/src/VuFind/Controller/AbstractRecord.php
index 87b8fe6c8ec97e829667b9c9bc7eeed7b25c1667..e46e8a3066d388f2fb7c3def00872392ab3c3e4e 100644
--- a/module/VuFind/src/VuFind/Controller/AbstractRecord.php
+++ b/module/VuFind/src/VuFind/Controller/AbstractRecord.php
@@ -717,7 +717,7 @@ class AbstractRecord extends AbstractBase
             && !$this->getUser()
         ) {
             return $this->forceLogin(null);
-        } else if ($this->params()->fromQuery('catalogLogin', 'false') == 'true'
+        } elseif ($this->params()->fromQuery('catalogLogin', 'false') == 'true'
             && !is_array($patron = $this->catalogLogin())
         ) {
             return $patron;
diff --git a/module/VuFind/src/VuFind/Controller/AbstractSearch.php b/module/VuFind/src/VuFind/Controller/AbstractSearch.php
index 56e398a666eb2395b9155441fa558fd22d9b819c..2fe683a443ff61a588bcca124a0ebf3b854c7227 100644
--- a/module/VuFind/src/VuFind/Controller/AbstractSearch.php
+++ b/module/VuFind/src/VuFind/Controller/AbstractSearch.php
@@ -190,7 +190,7 @@ class AbstractSearch extends AbstractBase
             || $noRecommend === 'true' || $noRecommend === true
         ) {
             return [];
-        } else if ($noRecommend === 0 || $noRecommend === '0'
+        } elseif ($noRecommend === 0 || $noRecommend === '0'
             || $noRecommend === 'false' || $noRecommend === false
         ) {
             return $all;
diff --git a/module/VuFind/src/VuFind/Controller/AjaxController.php b/module/VuFind/src/VuFind/Controller/AjaxController.php
index 6b94435e0c8ce6a27ba7ac997af95e8ddace3005..9030dd6e749690f489a690d2c5a37ebd8e8aea85 100644
--- a/module/VuFind/src/VuFind/Controller/AjaxController.php
+++ b/module/VuFind/src/VuFind/Controller/AjaxController.php
@@ -288,10 +288,10 @@ class AjaxController extends AbstractBase
             } else {
                 return $this->translate($transPrefix . $list[0], [], $list[0]);
             }
-        } else if (count($list) == 0) {
+        } elseif (count($list) == 0) {
             // Empty list?  Return a blank string:
             return '';
-        } else if ($mode == 'all') {
+        } elseif ($mode == 'all') {
             // Translate values if necessary:
             if ($transPrefix) {
                 $transList = [];
@@ -611,7 +611,7 @@ class AjaxController extends AbstractBase
             }
             $response->setContent(json_encode($output));
             return $response;
-        } else if ($this->outputMode == 'plaintext') {
+        } elseif ($this->outputMode == 'plaintext') {
             $headers->addHeaderLine('Content-type', 'text/plain');
             $response->setContent($data ? $status . " $data" : $status);
             return $response;
diff --git a/module/VuFind/src/VuFind/Controller/CartController.php b/module/VuFind/src/VuFind/Controller/CartController.php
index 257bcedeb0deefbc102fcd9996ba43916919ea47..f8913bbbd620a96aa93472c58fdf68654fd92df6 100644
--- a/module/VuFind/src/VuFind/Controller/CartController.php
+++ b/module/VuFind/src/VuFind/Controller/CartController.php
@@ -83,11 +83,11 @@ class CartController extends AbstractBase
     {
         if (strlen($this->params()->fromPost('email', '')) > 0) {
             return 'Email';
-        } else if (strlen($this->params()->fromPost('print', '')) > 0) {
+        } elseif (strlen($this->params()->fromPost('print', '')) > 0) {
             return 'PrintCart';
-        } else if (strlen($this->params()->fromPost('saveCart', '')) > 0) {
+        } elseif (strlen($this->params()->fromPost('saveCart', '')) > 0) {
             return 'Save';
-        } else if (strlen($this->params()->fromPost('export', '')) > 0) {
+        } elseif (strlen($this->params()->fromPost('export', '')) > 0) {
             return 'Export';
         }
         // Check if the user is in the midst of a login process; if not,
@@ -156,13 +156,13 @@ class CartController extends AbstractBase
         // Add items if necessary:
         if (strlen($this->params()->fromPost('empty', '')) > 0) {
             $this->getCart()->emptyCart();
-        } else if (strlen($this->params()->fromPost('delete', '')) > 0) {
+        } elseif (strlen($this->params()->fromPost('delete', '')) > 0) {
             if (empty($ids)) {
                 return $this->redirectToSource('error', 'bulk_noitems_advice');
             } else {
                 $this->getCart()->removeItems($ids);
             }
-        } else if (strlen($this->params()->fromPost('add', '')) > 0) {
+        } elseif (strlen($this->params()->fromPost('add', '')) > 0) {
             if (empty($ids)) {
                 return $this->redirectToSource('error', 'bulk_noitems_advice');
             } else {
@@ -203,14 +203,14 @@ class CartController extends AbstractBase
         $controller = 'Cart';   // assume Cart unless overridden below.
         if (strlen($this->params()->fromPost('email', '')) > 0) {
             $action = 'Email';
-        } else if (strlen($this->params()->fromPost('print', '')) > 0) {
+        } elseif (strlen($this->params()->fromPost('print', '')) > 0) {
             $action = 'PrintCart';
-        } else if (strlen($this->params()->fromPost('delete', '')) > 0) {
+        } elseif (strlen($this->params()->fromPost('delete', '')) > 0) {
             $controller = 'MyResearch';
             $action = 'Delete';
-        } else if (strlen($this->params()->fromPost('add', '')) > 0) {
+        } elseif (strlen($this->params()->fromPost('add', '')) > 0) {
             $action = 'Home';
-        } else if (strlen($this->params()->fromPost('export', '')) > 0) {
+        } elseif (strlen($this->params()->fromPost('export', '')) > 0) {
             $action = 'Export';
         } else {
             throw new \Exception('Unrecognized bulk action.');
diff --git a/module/VuFind/src/VuFind/Controller/InstallController.php b/module/VuFind/src/VuFind/Controller/InstallController.php
index fa7773fb118dce3dc28a7f5b42a43b12bccf447d..800e6755fbedd27d1882cee0529e48c6211d3735 100644
--- a/module/VuFind/src/VuFind/Controller/InstallController.php
+++ b/module/VuFind/src/VuFind/Controller/InstallController.php
@@ -335,16 +335,16 @@ class InstallController extends AbstractBase
         if (!preg_match('/^\w*$/', $view->dbname)) {
             $this->flashMessenger()
                 ->addMessage('Database name must be alphanumeric.', 'error');
-        } else if (!preg_match('/^\w*$/', $view->dbuser)) {
+        } elseif (!preg_match('/^\w*$/', $view->dbuser)) {
             $this->flashMessenger()
                 ->addMessage('Database user must be alphanumeric.', 'error');
-        } else if ($skip || $this->formWasSubmitted('submit')) {
+        } elseif ($skip || $this->formWasSubmitted('submit')) {
             $newpass = $this->params()->fromPost('dbpass');
             $newpassConf = $this->params()->fromPost('dbpassconfirm');
             if ((empty($newpass) || empty($newpassConf))) {
                 $this->flashMessenger()
                     ->addMessage('Password fields must not be blank.', 'error');
-            } else if ($newpass != $newpassConf) {
+            } elseif ($newpass != $newpassConf) {
                 $this->flashMessenger()
                     ->addMessage('Password fields must match.', 'error');
             } else {
diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php
index e36635dd25c53f27f3f15aa34e33a46c7106a869..3f10ff132532da11b40080e09e52d3f9747f11d0 100644
--- a/module/VuFind/src/VuFind/Controller/MyResearchController.php
+++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php
@@ -358,7 +358,7 @@ class MyResearchController extends AbstractBase
         if (($id = $this->params()->fromQuery('save', false)) !== false) {
             $this->setSavedFlagSecurely($id, true, $user->id);
             $this->flashMessenger()->addMessage('search_save_success', 'success');
-        } else if (($id = $this->params()->fromQuery('delete', false)) !== false) {
+        } elseif (($id = $this->params()->fromQuery('delete', false)) !== false) {
             $this->setSavedFlagSecurely($id, false, $user->id);
             $this->flashMessenger()->addMessage('search_unsave_success', 'success');
         } else {
diff --git a/module/VuFind/src/VuFind/Controller/Plugin/Holds.php b/module/VuFind/src/VuFind/Controller/Plugin/Holds.php
index e39e55017a83ebc832c5621385579d864f1ffbb6..264e4f3b5da9e36a1fbe940cdafc9064f47e6a79 100644
--- a/module/VuFind/src/VuFind/Controller/Plugin/Holds.php
+++ b/module/VuFind/src/VuFind/Controller/Plugin/Holds.php
@@ -58,7 +58,7 @@ class Holds extends AbstractRequestBase
                 // Build OPAC URL
                 $ilsDetails['cancel_link']
                     = $catalog->getCancelHoldLink($ilsDetails);
-            } else if (isset($ilsDetails['cancel_details'])) {
+            } elseif (isset($ilsDetails['cancel_details'])) {
                 // The ILS driver provided cancel details up front. If the
                 // details are an empty string (flagging lack of support), we
                 // should unset it to prevent confusion; otherwise, we'll leave it
@@ -106,7 +106,7 @@ class Holds extends AbstractRequestBase
         $selected = $params->fromPost('cancelSelected');
         if (!empty($all)) {
             $details = $params->fromPost('cancelAllIDS');
-        } else if (!empty($selected)) {
+        } elseif (!empty($selected)) {
             $details = $params->fromPost('cancelSelectedIDS');
         } else {
             // No button pushed -- no action needed
diff --git a/module/VuFind/src/VuFind/Controller/Plugin/ILLRequests.php b/module/VuFind/src/VuFind/Controller/Plugin/ILLRequests.php
index dbbcea26ddfc4b5d8c0735e628c8cb975ab43c55..ede5109abb69f360292f372f24eb6b62b8891d8e 100644
--- a/module/VuFind/src/VuFind/Controller/Plugin/ILLRequests.php
+++ b/module/VuFind/src/VuFind/Controller/Plugin/ILLRequests.php
@@ -101,7 +101,7 @@ class ILLRequests extends AbstractRequestBase
         $selected = $params->fromPost('cancelSelected');
         if (!empty($all)) {
             $details = $params->fromPost('cancelAllIDS');
-        } else if (!empty($selected)) {
+        } elseif (!empty($selected)) {
             $details = $params->fromPost('cancelSelectedIDS');
         } else {
             // No button pushed -- no action needed
diff --git a/module/VuFind/src/VuFind/Controller/Plugin/Renewals.php b/module/VuFind/src/VuFind/Controller/Plugin/Renewals.php
index 251a4117c908a7eefeb7fa900831568f5c790d54..eb8b79260851c55735bf1fbb74315cca4c1f6dea 100644
--- a/module/VuFind/src/VuFind/Controller/Plugin/Renewals.php
+++ b/module/VuFind/src/VuFind/Controller/Plugin/Renewals.php
@@ -86,7 +86,7 @@ class Renewals extends AbstractPlugin
         $selected = $request->get('renewSelected');
         if (!empty($all)) {
             $ids = $request->get('renewAllIDS');
-        } else if (!empty($selected)) {
+        } elseif (!empty($selected)) {
             $ids = $request->get('selectAll')
                 ? $request->get('selectAllIDS')
                 : $request->get('renewSelectedIDS');
@@ -118,7 +118,7 @@ class Renewals extends AbstractPlugin
                 // System failure:
                 $flashMsg->addMessage('renew_error', 'error');
             }
-        } else if (!empty($all) || !empty($selected)) {
+        } elseif (!empty($all) || !empty($selected)) {
             // Button was clicked but no items were selected:
             $flashMsg->addMessage('renew_empty_selection', 'error');
         }
diff --git a/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php b/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php
index a59a6a19a26ad1a9655fbe36f1e51e0c669461dc..82c0ab36195916a53f360d37b883563deae6b789 100644
--- a/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php
+++ b/module/VuFind/src/VuFind/Controller/Plugin/ResultScroller.php
@@ -372,7 +372,7 @@ class ResultScroller extends AbstractPlugin
         if (count($this->data->currIds) > 1) {
             $pos = count($this->data->currIds) - 2;
             $retVal['previousRecord'] = $this->data->currIds[$pos];
-        } else if (count($this->data->prevIds) > 0) {
+        } elseif (count($this->data->prevIds) > 0) {
             $prevPos = count($this->data->prevIds) - 1;
             $retVal['previousRecord'] = $this->data->prevIds[$prevPos];
         }
@@ -485,11 +485,11 @@ class ResultScroller extends AbstractPlugin
                     // the current record is somewhere in the middle of the current
                     // page, ie: not first or last
                     return $this->scrollOnCurrentPage($retVal, $pos);
-                } else if ($pos == 0) {
+                } elseif ($pos == 0) {
                     // this record is first record on the current page
                     return $this
                         ->fetchPreviousPage($retVal, $lastSearch, $pos, $count);
-                } else if ($pos == $count - 1) {
+                } elseif ($pos == $count - 1) {
                     // this record is last record on the current page
                     return $this->fetchNextPage($retVal, $lastSearch, $pos);
                 }
diff --git a/module/VuFind/src/VuFind/Controller/Plugin/StorageRetrievalRequests.php b/module/VuFind/src/VuFind/Controller/Plugin/StorageRetrievalRequests.php
index e524f79107bc7f149585a81f80f6a03b112ab350..50413be6b04cdd659a4d8ccb28cbee06fe273812 100644
--- a/module/VuFind/src/VuFind/Controller/Plugin/StorageRetrievalRequests.php
+++ b/module/VuFind/src/VuFind/Controller/Plugin/StorageRetrievalRequests.php
@@ -101,7 +101,7 @@ class StorageRetrievalRequests extends AbstractRequestBase
         $selected = $params->fromPost('cancelSelected');
         if (!empty($all)) {
             $details = $params->fromPost('cancelAllIDS');
-        } else if (!empty($selected)) {
+        } elseif (!empty($selected)) {
             $details = $params->fromPost('cancelSelectedIDS');
         } else {
             // No button pushed -- no action needed
diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php
index 4ff3580b6f0dff5a605f23220b25d175bdc82add..c894ff381ba0f09f9279ac3c1d5837437508d4ba 100644
--- a/module/VuFind/src/VuFind/Controller/SearchController.php
+++ b/module/VuFind/src/VuFind/Controller/SearchController.php
@@ -160,7 +160,7 @@ class SearchController extends AbstractSearch
         ) {
             $illYes['selected'] = true;
             $savedSearch->getParams()->removeFilter('illustrated:Illustrated');
-        } else if ($savedSearch
+        } elseif ($savedSearch
             && $savedSearch->getParams()->hasFilter('illustrated:"Not Illustrated"')
         ) {
             $illNo['selected'] = true;
diff --git a/module/VuFind/src/VuFind/Controller/UpgradeController.php b/module/VuFind/src/VuFind/Controller/UpgradeController.php
index a27a07fbe409bf3423cd201c6520875abd6c89c2..92aa9181d4d9c0b6967da6fdf116e1192eedf4d7 100644
--- a/module/VuFind/src/VuFind/Controller/UpgradeController.php
+++ b/module/VuFind/src/VuFind/Controller/UpgradeController.php
@@ -605,7 +605,7 @@ class UpgradeController extends AbstractBase
         if ($action == 'Change') {
             $this->session->dbChangeEncoding = true;
             return $this->forwardTo('Upgrade', 'FixDatabase');
-        } else if ($action == 'Keep') {
+        } elseif ($action == 'Keep') {
             $this->session->dbChangeEncoding = false;
             return $this->forwardTo('Upgrade', 'FixDatabase');
         }
@@ -736,7 +736,7 @@ class UpgradeController extends AbstractBase
             if (!is_dir($dir)) {
                 $this->flashMessenger()
                     ->addMessage($dir . ' does not exist.', 'error');
-            } else if (!file_exists($dir . '/build.xml')) {
+            } elseif (!file_exists($dir . '/build.xml')) {
                 $this->flashMessenger()->addMessage(
                     'Could not find build.xml in source directory;'
                     . ' upgrade does not support VuFind versions prior to 1.1.',
@@ -780,7 +780,7 @@ class UpgradeController extends AbstractBase
             if (floor($version) < 2) {
                 $this->flashMessenger()
                     ->addMessage('Illegal version number.', 'error');
-            } else if ($version >= $this->cookie->newVersion) {
+            } elseif ($version >= $this->cookie->newVersion) {
                 $this->flashMessenger()->addMessage(
                     "Source version must be less than {$this->cookie->newVersion}.",
                     'error'
diff --git a/module/VuFind/src/VuFind/Cover/Loader.php b/module/VuFind/src/VuFind/Cover/Loader.php
index 9716ca0d74b2635fd59d8aebda5fdffd1f2d6b92..2358c91822afc5be7b3fac314a7209a42ac02fbd 100644
--- a/module/VuFind/src/VuFind/Cover/Loader.php
+++ b/module/VuFind/src/VuFind/Cover/Loader.php
@@ -302,7 +302,7 @@ class Loader extends \VuFind\ImageLoader
         // are able to display an ISBN or content-type-based image.
         if (!in_array($this->size, $this->validSizes)) {
             $this->loadUnavailable();
-        } else if (!$this->fetchFromAPI()
+        } elseif (!$this->fetchFromAPI()
             && !$this->fetchFromContentType()
         ) {
             if ($generator = $this->getCoverGenerator()) {
@@ -334,13 +334,13 @@ class Loader extends \VuFind\ImageLoader
                 return $this->getCachePath($this->size, $ids['isbn']->get10());
             }
             return $file;
-        } else if (isset($ids['issn'])) {
+        } elseif (isset($ids['issn'])) {
             return $this->getCachePath($this->size, $ids['issn']);
-        } else if (isset($ids['oclc'])) {
+        } elseif (isset($ids['oclc'])) {
             return $this->getCachePath($this->size, 'OCLC' . $ids['oclc']);
-        } else if (isset($ids['upc'])) {
+        } elseif (isset($ids['upc'])) {
             return $this->getCachePath($this->size, 'UPC' . $ids['upc']);
-        } else if (isset($ids['recordid']) && isset($ids['source'])) {
+        } elseif (isset($ids['recordid']) && isset($ids['source'])) {
             return $this->getCachePath(
                 $this->size,
                 'ID' . md5($ids['source'] . '|' . $ids['recordid'])
@@ -398,7 +398,7 @@ class Loader extends \VuFind\ImageLoader
             $this->contentType = 'image/jpeg';
             $this->image = file_get_contents($this->localFile);
             return true;
-        } else if (isset($this->config->Content->coverimages)) {
+        } elseif (isset($this->config->Content->coverimages)) {
             $providers = explode(',', $this->config->Content->coverimages);
             foreach ($providers as $provider) {
                 $provider = explode(':', trim($provider));
@@ -562,7 +562,7 @@ class Loader extends \VuFind\ImageLoader
                 ? trim(strtolower($this->config->Content->coverimagesCache)) : true;
             if ($conf === true || $conf === 1 || $conf === '1' || $conf === 'true') {
                 $cache = true;
-            } else if ($conf === false || $conf === 0 || $conf === '0'
+            } elseif ($conf === false || $conf === 0 || $conf === '0'
                 || $conf === 'false'
             ) {
                 $cache = false;
diff --git a/module/VuFind/src/VuFind/Date/Converter.php b/module/VuFind/src/VuFind/Date/Converter.php
index 7418ebd823d9e1f25945a45d0d43aab002513899..5fb0d8c09b189159adb548981cd07620c5cecf59 100644
--- a/module/VuFind/src/VuFind/Date/Converter.php
+++ b/module/VuFind/src/VuFind/Date/Converter.php
@@ -156,7 +156,7 @@ class Converter
             foreach ($details['errors'] as $error) {
                 $errors .= $error . " ";
             }
-        } else if (is_array($details['warnings'])) {
+        } elseif (is_array($details['warnings'])) {
             foreach ($details['warnings'] as $warning) {
                 $errors .= $warning . " ";
             }
diff --git a/module/VuFind/src/VuFind/Db/Table/Tags.php b/module/VuFind/src/VuFind/Db/Table/Tags.php
index a39c4e6da1304ee4f688252664849d84014e1c0c..1e033d678d2bea6dfc34706a8311127ff5be2593 100644
--- a/module/VuFind/src/VuFind/Db/Table/Tags.php
+++ b/module/VuFind/src/VuFind/Db/Table/Tags.php
@@ -151,7 +151,7 @@ class Tags extends Gateway
             );
             if ($fuzzy) {
                 $select->where->literal('lower(tags.tag) like lower(?)', [$q]);
-            } else if (!$this->caseSensitive) {
+            } elseif (!$this->caseSensitive) {
                 $select->where->literal('lower(tags.tag) = lower(?)', [$q]);
             } else {
                 $select->where->equalTo('tags.tag', $q);
@@ -241,7 +241,7 @@ class Tags extends Gateway
 
                 if ($sort == 'count') {
                     $select->order(['cnt DESC', new Expression('lower(tags.tag)')]);
-                } else if ($sort == 'tag') {
+                } elseif ($sort == 'tag') {
                     $select->order([new Expression('lower(tags.tag)')]);
                 }
 
@@ -250,9 +250,9 @@ class Tags extends Gateway
                 }
                 if ($list === true) {
                     $select->where->isNotNull('rt.list_id');
-                } else if ($list === false) {
+                } elseif ($list === false) {
                     $select->where->isNull('rt.list_id');
-                } else if (null !== $list) {
+                } elseif (null !== $list) {
                     $select->where->equalTo('rt.list_id', $list);
                 }
                 if (null !== $user) {
diff --git a/module/VuFind/src/VuFind/I18n/ExtendedIniNormalizer.php b/module/VuFind/src/VuFind/I18n/ExtendedIniNormalizer.php
index 87a256c8b77db7dbdf20538f13cb5b049b5471ac..88dab773658fdd6bee4525a09e7adeccf0cce481 100644
--- a/module/VuFind/src/VuFind/I18n/ExtendedIniNormalizer.php
+++ b/module/VuFind/src/VuFind/I18n/ExtendedIniNormalizer.php
@@ -55,7 +55,7 @@ class ExtendedIniNormalizer
             $full = $dir . '/' . $file;
             if ($file != '.' && $file != '..' && is_dir($full)) {
                 $this->normalizeDirectory($full);
-            } else if (substr($file, -4) == '.ini') {
+            } elseif (substr($file, -4) == '.ini') {
                 $this->normalizeFile($full);
             }
         }
diff --git a/module/VuFind/src/VuFind/ILS/Connection.php b/module/VuFind/src/VuFind/ILS/Connection.php
index 088a93f3f5d1ec0a306db649ff065f713e9b979e..e8ef00e8fefb51abc4bf7e306214fc5c2516da92 100644
--- a/module/VuFind/src/VuFind/ILS/Connection.php
+++ b/module/VuFind/src/VuFind/ILS/Connection.php
@@ -373,7 +373,7 @@ class Connection implements TranslatorAwareInterface, LoggerAwareInterface
             && $this->checkCapability('cancelHolds', [$params ?: []])
         ) {
             $response = ['function' => "cancelHolds"];
-        } else if (isset($this->config->cancel_holds_enabled)
+        } elseif (isset($this->config->cancel_holds_enabled)
             && $this->config->cancel_holds_enabled == true
             && $this->checkCapability('getCancelHoldLink', [$params ?: []])
         ) {
@@ -408,7 +408,7 @@ class Connection implements TranslatorAwareInterface, LoggerAwareInterface
             && $this->checkCapability('renewMyItems', [$params ?: []])
         ) {
             $response = ['function' => "renewMyItems"];
-        } else if (isset($this->config->renewals_enabled)
+        } elseif (isset($this->config->renewals_enabled)
             && $this->config->renewals_enabled == true
             && $this->checkCapability('renewMyItemsLink', [$params ?: []])
         ) {
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php
index 2e891796c1c3f75b3b98d4c7806a7a09d10d1584..276833e61acdb76b4398971db1f198bf8544839d 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php
@@ -732,7 +732,7 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface,
         $params = ['view' => 'full'];
         if (!empty($patron['id'])) {
             $params['patron'] = $patron['id'];
-        } else if (isset($this->defaultPatronId)) {
+        } elseif (isset($this->defaultPatronId)) {
             $params['patron'] = $this->defaultPatronId;
         }
         $xml = $this->doRestDLFRequest(['record', $resource, 'items'], $params);
@@ -787,7 +787,7 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface,
             if (preg_match($dueDateWithStatusRegEx, $status, $matches)) {
                 $duedate = $this->parseDate($matches[1]);
                 $requested = (trim($matches[2]) == "Requested");
-            } else if (preg_match($dueDateRegEx, $status, $matches)) {
+            } elseif (preg_match($dueDateRegEx, $status, $matches)) {
                 $duedate = $this->parseDate($matches[1]);
             } else {
                 $duedate = null;
@@ -1569,12 +1569,12 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface,
     {
         if ($date == null || $date == "") {
             return "";
-        } else if (preg_match("/^[0-9]{8}$/", $date) === 1) { // 20120725
+        } elseif (preg_match("/^[0-9]{8}$/", $date) === 1) { // 20120725
             return $this->dateConverter->convertToDisplayDate('Ynd', $date);
-        } else if (preg_match("/^[0-9]+\/[A-Za-z]{3}\/[0-9]{4}$/", $date) === 1) {
+        } elseif (preg_match("/^[0-9]+\/[A-Za-z]{3}\/[0-9]{4}$/", $date) === 1) {
             // 13/jan/2012
             return $this->dateConverter->convertToDisplayDate('d/M/Y', $date);
-        } else if (preg_match("/^[0-9]+\/[0-9]+\/[0-9]{4}$/", $date) === 1) {
+        } elseif (preg_match("/^[0-9]+\/[0-9]+\/[0-9]{4}$/", $date) === 1) {
             // 13/7/2012
             return $this->dateConverter->convertToDisplayDate('d/m/Y', $date);
         } else {
@@ -1676,7 +1676,7 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface,
             // locationId in pickupLocations array
             reset($pickupLocations);
             return key($pickupLocations);
-        } else if (isset($this->preferredPickUpLocations)) {
+        } elseif (isset($this->preferredPickUpLocations)) {
             return $this->preferredPickUpLocations[0];
         } else {
             throw new ILSException(
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php
index 1368ef4212e2918cf6718a23a0800e1addfd4c1a..fee850e69d519907774941c982029c5d9442165a 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php
@@ -909,7 +909,7 @@ class Horizon extends AbstractBase
             if (is_numeric($dueTimeStamp)) {
                 if ($now > $dueTimeStamp) {
                     $dueStatus = "overdue";
-                } else if ($now > $dueTimeStamp - (1 * 24 * 60 * 60)) {
+                } elseif ($now > $dueTimeStamp - (1 * 24 * 60 * 60)) {
                     $dueStatus = "due";
                 }
             }
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Innovative.php b/module/VuFind/src/VuFind/ILS/Driver/Innovative.php
index 7b49eda3de7cb04276fbca911c3ba2c336126987..4d9334653a97e0a008e769ae222c80e3b8dc0318 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Innovative.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Innovative.php
@@ -187,7 +187,7 @@ class Innovative extends AbstractBase implements
                 // names
                 if ($count == 1) {
                     $keys[$i] = $cols[$i];
-                } else if ($count > 1) { // not the first row, has holding info
+                } elseif ($count > 1) { // not the first row, has holding info
                     //look for location column
                     if (stripos($keys[$i], $loc_col_name) > -1) {
                         $ret[$count - 2]['location'] = strip_tags($cols[$i]);
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Koha.php b/module/VuFind/src/VuFind/ILS/Driver/Koha.php
index 0e5ea5175d8ef0e811d13d1d27377d2a7867e6f6..f9aea5707d40096bdbe8cd276434bb64bb75965d 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Koha.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Koha.php
@@ -654,10 +654,10 @@ class Koha extends AbstractBase
     {
         if (empty($date)) {
             return "";
-        } else if (preg_match("/^\d{4}-\d\d-\d\d \d\d:\d\d:\d\d$/", $date) === 1) {
+        } elseif (preg_match("/^\d{4}-\d\d-\d\d \d\d:\d\d:\d\d$/", $date) === 1) {
             // YYYY-MM-DD HH:MM:SS
             return $this->dateConverter->convertToDisplayDate('Y-m-d H:i:s', $date);
-        } else if (preg_match("/^\d{4}-\d{2}-\d{2}$/", $date) === 1) { // YYYY-MM-DD
+        } elseif (preg_match("/^\d{4}-\d{2}-\d{2}$/", $date) === 1) { // YYYY-MM-DD
             return $this->dateConverter->convertToDisplayDate('Y-m-d', $date);
         } else {
             error_log("Unexpected date format: $date");
@@ -676,7 +676,7 @@ class Koha extends AbstractBase
     {
         if (empty($date)) {
             return "";
-        } else if (preg_match("/^\d{4}-\d\d-\d\d \d\d:\d\d:\d\d$/", $date) === 1) {
+        } elseif (preg_match("/^\d{4}-\d\d-\d\d \d\d:\d\d:\d\d$/", $date) === 1) {
             // YYYY-MM-DD HH:MM:SS
             return
                 $this->dateConverter->convertToDisplayDateAndTime(
diff --git a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php
index 4ae958646698b3436af3df2eddfe7b2aeded0c8a..147c80255b03aa9af34fa6e730879ae3a03f5b58 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php
@@ -238,9 +238,9 @@ class LBS4 extends DAIA implements TranslatorAwareInterface
                           ];
                 if ($row[6] == '81') {
                     $result['group'] = $this->translate('Staff');
-                } else if ($row[6] == '1') {
+                } elseif ($row[6] == '1') {
                     $result['group'] = $this->translate('Student');
-                } else if ($row[6] == '30') {
+                } elseif ($row[6] == '30') {
                     $result['group'] = $this->translate('Residents');
                 }
                 $row = sybase_fetch_row($sqlStmt);
diff --git a/module/VuFind/src/VuFind/ILS/Driver/NoILS.php b/module/VuFind/src/VuFind/ILS/Driver/NoILS.php
index 4ec06cdbe6c504172684be8c7d8df6b38316386b..b4115ddf2bf01745bc9aca2d59af5d45fe14ce4f 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/NoILS.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/NoILS.php
@@ -152,7 +152,7 @@ class NoILS extends AbstractBase implements TranslatorAwareInterface
                     )
                 ]
             ];
-        } else if ($useStatus == "marc") {
+        } elseif ($useStatus == "marc") {
             // Retrieve record from index:
             $recordDriver = $this->getSolrRecord($id);
             return $this->getFormattedMarcDetails($recordDriver, 'MarcStatus');
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php
index a88237ac2eb7e874a50d96fea423093ba459a660..f10be792861926d119ba64633ec7b4be38ff18f2 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php
@@ -1082,7 +1082,7 @@ class Unicorn extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
         ) {
             $availability = 0;
             $status = $this->config['UnavailableItemTypes'][$item_type];
-        } else if (isset($this->config['UnavailableLocations'])
+        } elseif (isset($this->config['UnavailableLocations'])
             && isset($this->config['UnavailableLocations'][$currLocCode])
         ) {
             $availability = 0;
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php
index fce9f8df1b61ba4de2d852851be18ebff8c68cdc..599fa25fb3d5876c464ab790a53ab59286182896 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php
@@ -1430,7 +1430,7 @@ EOT;
             if (is_numeric($dueTimeStamp)) {
                 if ($now > $dueTimeStamp) {
                     $dueStatus = "overdue";
-                } else if ($now > $dueTimeStamp - (1 * 24 * 60 * 60)) {
+                } elseif ($now > $dueTimeStamp - (1 * 24 * 60 * 60)) {
                     $dueStatus = "due";
                 }
             }
@@ -2020,7 +2020,7 @@ EOT;
                 $addr1 = utf8_encode($row['ADDRESS_LINE1']);
                 if ($validator->isValid($addr1)) {
                     $patron['email'] = $addr1;
-                } else if (!isset($patron['address1'])) {
+                } elseif (!isset($patron['address1'])) {
                     if (!empty($addr1)) {
                         $patron['address1'] = $addr1;
                     }
diff --git a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php
index 3031d875412386a612e33c9d0ff14cd0413ddd83..92061e3284f5ac36775ab1a40b8452a579170928 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php
@@ -2230,7 +2230,7 @@ EOT;
                     if ($dueTimeStamp !== false && is_numeric($dueTimeStamp)) {
                         if ($now > $dueTimeStamp) {
                             $dueStatus = 'overdue';
-                        } else if ($now > $dueTimeStamp - (1 * 24 * 60 * 60)) {
+                        } elseif ($now > $dueTimeStamp - (1 * 24 * 60 * 60)) {
                             $dueStatus = 'due';
                         }
                     }
diff --git a/module/VuFind/src/VuFind/ILS/Logic/Holds.php b/module/VuFind/src/VuFind/ILS/Logic/Holds.php
index 15b0845ae57f0e5e2a0e800cb9f029ac495b79a9..3c56c8dc7b805a9935f7777ff3c8c8161b05cff1 100644
--- a/module/VuFind/src/VuFind/ILS/Logic/Holds.php
+++ b/module/VuFind/src/VuFind/ILS/Logic/Holds.php
@@ -218,7 +218,7 @@ class Holds
 
             if ($mode == "disabled") {
                 $holdings = $this->standardHoldings($result);
-            } else if ($mode == "driver") {
+            } elseif ($mode == "driver") {
                 $holdings = $this->driverHoldings($result, $config, !empty($blocks));
             } else {
                 $holdings = $this->generateHoldings($result, $mode, $config);
diff --git a/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php b/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php
index 1a2cbb2d00c18f9e5c241983a0e764407b588f21..a00efec1297647dd8183359068c1787f5133cf11 100644
--- a/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php
+++ b/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php
@@ -118,7 +118,7 @@ class TitleHolds
             $mode = $this->catalog->getTitleHoldsMode();
             if ($mode == 'disabled') {
                  return false;
-            } else if ($mode == 'driver') {
+            } elseif ($mode == 'driver') {
                 try {
                     $patron = $this->ilsAuth->storedCatalogLogin();
                     if (!$patron) {
diff --git a/module/VuFind/src/VuFind/Mailer/Mailer.php b/module/VuFind/src/VuFind/Mailer/Mailer.php
index 6e3893f32565adc76be76470a207458ff325cfe9..865c029f96ecef71c48487acce4c0ed611341f67 100644
--- a/module/VuFind/src/VuFind/Mailer/Mailer.php
+++ b/module/VuFind/src/VuFind/Mailer/Mailer.php
@@ -147,7 +147,7 @@ class Mailer implements \VuFind\I18n\Translator\TranslatorAwareInterface
     {
         if ($to instanceof AddressList) {
             $recipients = $to;
-        } else if ($to instanceof Address) {
+        } elseif ($to instanceof Address) {
             $recipients = new AddressList();
             $recipients->add($to);
         } else {
diff --git a/module/VuFind/src/VuFind/OAI/Server.php b/module/VuFind/src/VuFind/OAI/Server.php
index e717d3412a9f20688bd2a263700717c39590f8bc..ca469821f9b3e16bef837137edf4f13d60a2acea 100644
--- a/module/VuFind/src/VuFind/OAI/Server.php
+++ b/module/VuFind/src/VuFind/OAI/Server.php
@@ -614,7 +614,7 @@ class Server
         $listSize = $deletedCount + $nonDeletedCount;
         if ($listSize > $currentCursor) {
             $this->saveResumptionToken($xml, $params, $currentCursor, $listSize);
-        } else if ($solrOffset > 0) {
+        } elseif ($solrOffset > 0) {
             // If we reached the end of the list but there is more than one page, we
             // still need to display an empty <resumptionToken> tag:
             $token = $xml->addChild('resumptionToken');
@@ -734,7 +734,7 @@ class Server
                 // use hidden filter here to allow for complex queries;
                 // plain old addFilter expects simple field:value queries.
                 $params->addHiddenFilter($this->setQueries[$set]);
-            } else if (null !== $this->setField) {
+            } elseif (null !== $this->setField) {
                 $params->addFilter(
                     $this->setField . ':"' . addcslashes($set, '"') . '"'
                 );
@@ -842,7 +842,7 @@ class Server
             } else {
                 return true;
             }
-        } else if (strpos($until, 'T') && strpos($until, 'Z')) {
+        } elseif (strpos($until, 'T') && strpos($until, 'Z')) {
             return true;
         }
 
diff --git a/module/VuFind/src/VuFind/Recommend/OpenLibrarySubjects.php b/module/VuFind/src/VuFind/Recommend/OpenLibrarySubjects.php
index 377197f9ad1ba4c824165a7318955b2bab1c1eb7..6d2a8d6b5d0b8d86cce11e7a3e387d78f9537f72 100644
--- a/module/VuFind/src/VuFind/Recommend/OpenLibrarySubjects.php
+++ b/module/VuFind/src/VuFind/Recommend/OpenLibrarySubjects.php
@@ -203,7 +203,7 @@ class OpenLibrarySubjects implements RecommendInterface,
         $to = $request->get($field . 'to');
         if (!is_null($from) && !is_null($to)) {
             $range = ['from' => $from, 'to' => $to];
-        } else if (is_object($params)) {
+        } elseif (is_object($params)) {
             $currentFilters = $params->getFilters();
             if (isset($currentFilters[$field][0])) {
                 $range = SolrUtils::parseRange($currentFilters[$field][0]);
diff --git a/module/VuFind/src/VuFind/RecordDriver/EIT.php b/module/VuFind/src/VuFind/RecordDriver/EIT.php
index 56c42d437ce442df43b695b726776e013f73e6fa..77806fce8c3e751dfe6fcd1bc3a257bbc422db95 100644
--- a/module/VuFind/src/VuFind/RecordDriver/EIT.php
+++ b/module/VuFind/src/VuFind/RecordDriver/EIT.php
@@ -217,7 +217,7 @@ class EIT extends SolrDefault
             return [
                 $this->controlInfo['pubinfo']['dt']['@attributes']['year']
             ];
-        } else if (isset($this->controlInfo['pubinfo']['dt'])) {
+        } elseif (isset($this->controlInfo['pubinfo']['dt'])) {
             return [$this->controlInfo['pubinfo']['dt']];
         } else {
             return [];
@@ -426,9 +426,9 @@ class EIT extends SolrDefault
         $formats = $this->getFormats();
         if (in_array('Book', $formats)) {
             return 'Book';
-        } else if (in_array('Article', $formats)) {
+        } elseif (in_array('Article', $formats)) {
             return 'Article';
-        } else if (in_array('Journal', $formats)) {
+        } elseif (in_array('Journal', $formats)) {
             return 'Journal';
         }
         // Defaulting to "Article" because many EBSCO databases have things like
diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php
index 1562ef72688add97e0ac26fe2b8c188ea3daae84..5ce77e09ce29827af5445bb739b9c4ef06356dd2 100644
--- a/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php
+++ b/module/VuFind/src/VuFind/RecordDriver/SolrDefault.php
@@ -801,15 +801,15 @@ class SolrDefault extends AbstractBase
         $formats = $this->getFormats();
         if (in_array('Book', $formats)) {
             return 'Book';
-        } else if (in_array('Article', $formats)) {
+        } elseif (in_array('Article', $formats)) {
             return 'Article';
-        } else if (in_array('Journal', $formats)) {
+        } elseif (in_array('Journal', $formats)) {
             return 'Journal';
-        } else if (isset($formats[0])) {
+        } elseif (isset($formats[0])) {
             return $formats[0];
-        } else if (strlen($this->getCleanISSN()) > 0) {
+        } elseif (strlen($this->getCleanISSN()) > 0) {
             return 'Journal';
-        } else if (strlen($this->getCleanISBN()) > 0) {
+        } elseif (strlen($this->getCleanISBN()) > 0) {
             return 'Book';
         }
         return 'UnknownFormat';
diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrMarc.php b/module/VuFind/src/VuFind/RecordDriver/SolrMarc.php
index b391d31016152bc32d08131c8d9d0e787d68cac8..8d990416c1b090512c67ab9eba63f5b408c3f1bf 100644
--- a/module/VuFind/src/VuFind/RecordDriver/SolrMarc.php
+++ b/module/VuFind/src/VuFind/RecordDriver/SolrMarc.php
@@ -380,7 +380,7 @@ class SolrMarc extends SolrDefault
             ? $this->mainConfig->Record->replaceMarc260 : false;
         if (count($pubResults) > 0) {
             return $replace260 ? $pubResults : array_merge($results, $pubResults);
-        } else if (count($copyResults) > 0) {
+        } elseif (count($copyResults) > 0) {
             return $replace260 ? $copyResults : array_merge($results, $copyResults);
         }
 
@@ -932,7 +932,7 @@ class SolrMarc extends SolrDefault
                     ? $matches[2]
                     : trim(str_replace(range('a', 'z'), '', ($matches[2])));
             }
-        } else if ($prefix == null) {
+        } elseif ($prefix == null) {
             // If no prefix was given or found, we presume it is a raw bib record
             return $text;
         }
diff --git a/module/VuFind/src/VuFind/RecordDriver/Summon.php b/module/VuFind/src/VuFind/RecordDriver/Summon.php
index 79b49428cca6cf7a8f2c0f29bf04044f6a222c84..553475b45506c827661afce3c9950ad23fe55598 100644
--- a/module/VuFind/src/VuFind/RecordDriver/Summon.php
+++ b/module/VuFind/src/VuFind/RecordDriver/Summon.php
@@ -334,7 +334,7 @@ class Summon extends SolrDefault
                         'm-d-Y',
                         "{$current['month']}-{$current['day']}-{$current['year']}"
                     );
-                } else if (isset($current['year'])) {
+                } elseif (isset($current['year'])) {
                     $dates[] = $current['year'];
                 }
             }
@@ -444,7 +444,7 @@ class Summon extends SolrDefault
         ) {
             if ($size === 'small' && isset($this->fields['thumbnail_s'][0])) {
                 return ['proxy' => $this->fields['thumbnail_s'][0]];
-            } else if (isset($this->fields['thumbnail_m'][0])) {
+            } elseif (isset($this->fields['thumbnail_m'][0])) {
                 return ['proxy' => $this->fields['thumbnail_m'][0]];
             }
         }
@@ -581,7 +581,7 @@ class Summon extends SolrDefault
     {
         if (isset($this->fields['EndPage'])) {
             return $this->fields['EndPage'][0];
-        } else if (isset($this->fields['PageCount'])
+        } elseif (isset($this->fields['PageCount'])
             && $this->fields['PageCount'] > 1
             && intval($this->fields['StartPage'][0]) > 0
         ) {
diff --git a/module/VuFind/src/VuFind/Resolver/Driver/Ezb.php b/module/VuFind/src/VuFind/Resolver/Driver/Ezb.php
index 62b11821dce4402f3f899ad5086f71fdcff860db..67f932b67c1e7c938438d5932242343ceccc9cbb 100644
--- a/module/VuFind/src/VuFind/Resolver/Driver/Ezb.php
+++ b/module/VuFind/src/VuFind/Resolver/Driver/Ezb.php
@@ -198,17 +198,17 @@ class Ezb extends AbstractBase
             if (isset($value) && $value !== '') {
                 if ($key == 'rfr_id') {
                     $newKey = 'sid';
-                } else if ($key == 'rft.date') {
+                } elseif ($key == 'rft.date') {
                     $newKey = 'date';
-                } else if ($key == 'rft.issn') {
+                } elseif ($key == 'rft.issn') {
                     $newKey = 'issn';
-                } else if ($key == 'rft.volume') {
+                } elseif ($key == 'rft.volume') {
                     $newKey = 'volume';
-                } else if ($key == 'rft.issue') {
+                } elseif ($key == 'rft.issue') {
                     $newKey = 'issue';
-                } else if ($key == 'rft.spage') {
+                } elseif ($key == 'rft.spage') {
                     $newKey = 'spage';
-                } else if ($key == 'rft.pages') {
+                } elseif ($key == 'rft.pages') {
                     $newKey = 'pages';
                 } else {
                     $newKey = false;
diff --git a/module/VuFind/src/VuFind/Role/DynamicRoleProvider.php b/module/VuFind/src/VuFind/Role/DynamicRoleProvider.php
index 7211e6bf0a996094945776716b627724019ff381..8690f1c3af2414e8c11f5b24f7a7e8a7b4539d99 100644
--- a/module/VuFind/src/VuFind/Role/DynamicRoleProvider.php
+++ b/module/VuFind/src/VuFind/Role/DynamicRoleProvider.php
@@ -184,7 +184,7 @@ class DynamicRoleProvider implements RoleProviderInterface
             $currentRoles = $providerObj->getPermissions($options);
             if ($roles === null) {
                 $roles = $currentRoles;
-            } else if ($mode == 'ANY') {
+            } elseif ($mode == 'ANY') {
                 $roles = array_merge($roles, $currentRoles);
             } else {
                 $roles = array_intersect($roles, $currentRoles);
diff --git a/module/VuFind/src/VuFind/Search/Base/Options.php b/module/VuFind/src/VuFind/Search/Base/Options.php
index 298db397c50fd1025ec7ef6c6350207eca5690ca..be76c77fd8de9820a6dce57cbf2511f428068b64 100644
--- a/module/VuFind/src/VuFind/Search/Base/Options.php
+++ b/module/VuFind/src/VuFind/Search/Base/Options.php
@@ -664,7 +664,7 @@ abstract class Options implements TranslatorAwareInterface
     {
         if (isset($this->basicHandlers[$field])) {
             return $this->translate($this->basicHandlers[$field]);
-        } else if (isset($this->advancedHandlers[$field])) {
+        } elseif (isset($this->advancedHandlers[$field])) {
             return $this->translate($this->advancedHandlers[$field]);
         } else {
             return $field;
diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php
index d0e1e6e448a486ffc2e4ab05bd1546bda7c0fcad..71c3f9dc4f40932ca0ab1072e665be9838270d0e 100644
--- a/module/VuFind/src/VuFind/Search/Base/Params.php
+++ b/module/VuFind/src/VuFind/Search/Base/Params.php
@@ -525,10 +525,10 @@ class Params
         if ($view == 'rss') {
             // RSS is a special case that does not require config validation
             $this->setView('rss');
-        } else if (!empty($view) && in_array($view, $validViews)) {
+        } elseif (!empty($view) && in_array($view, $validViews)) {
             // make sure the url parameter is a valid view
             $this->setView($view);
-        } else if (!empty($this->lastView)
+        } elseif (!empty($this->lastView)
             && in_array($this->lastView, $validViews)
         ) {
             // if there is nothing in the URL, see if we had a previous value
@@ -1070,7 +1070,7 @@ class Params
         if ($firstChar == '-') {
             $operator = 'NOT';
             $field = substr($field, 1);
-        } else if ($firstChar == '~') {
+        } elseif ($firstChar == '~') {
             $operator = 'OR';
             $field = substr($field, 1);
         } else {
@@ -1154,7 +1154,7 @@ class Params
         // Pad to four digits:
         if (strlen($year) == 2) {
             $year = '19' . $year;
-        } else if (strlen($year) == 3) {
+        } elseif (strlen($year) == 3) {
             $year = '0' . $year;
         }
 
diff --git a/module/VuFind/src/VuFind/Search/Solr/Params.php b/module/VuFind/src/VuFind/Search/Solr/Params.php
index 7fc778ae48f6ab1774f5d2b5f77e3e948546d350..179726799595ecba1b7a88dc2a980a6117194e86 100644
--- a/module/VuFind/src/VuFind/Search/Solr/Params.php
+++ b/module/VuFind/src/VuFind/Search/Solr/Params.php
@@ -158,7 +158,7 @@ class Params extends \VuFind\Search\Base\Params
                 // Special case -- complex filter, that should be taken as-is:
                 if ($field == '#') {
                     $q = $value;
-                } else if (substr($value, -1) == '*'
+                } elseif (substr($value, -1) == '*'
                     || preg_match('/\[[^\]]+\s+TO\s+[^\]]+\]/', $value)
                 ) {
                     // Special case -- allow trailing wildcards and ranges
@@ -606,7 +606,7 @@ class Params extends \VuFind\Search\Base\Params
         if (preg_match('/^\[(.*) TO (.*)\]$/', $value, $matches)) {
             // Simple case: [X TO Y]
             $filter['displayText'] = $matches[1] . '-' . $matches[2];
-        } else if (preg_match($caseInsensitiveRegex, $value, $matches)) {
+        } elseif (preg_match($caseInsensitiveRegex, $value, $matches)) {
             // Case insensitive case: [x TO y] OR [X TO Y]; convert
             // only if values in both ranges match up!
             if (strtolower($matches[3]) == strtolower($matches[1])
@@ -614,7 +614,7 @@ class Params extends \VuFind\Search\Base\Params
             ) {
                 $filter['displayText'] = $matches[1] . '-' . $matches[2];
             }
-        } else if ($this->facetHelper && in_array($field, $hierarchicalFacets)) {
+        } elseif ($this->facetHelper && in_array($field, $hierarchicalFacets)) {
             // Display hierarchical facet levels nicely
             $separator = isset($hierarchicalFacetSeparators[$field])
                 ? $hierarchicalFacetSeparators[$field]
diff --git a/module/VuFind/src/VuFind/Search/Summon/Params.php b/module/VuFind/src/VuFind/Search/Summon/Params.php
index 14f06f34caba57855a7b9ef7d60d0b354e0781dd..4937a685fd23989b802a870ab27dc449571c6e95 100644
--- a/module/VuFind/src/VuFind/Search/Summon/Params.php
+++ b/module/VuFind/src/VuFind/Search/Summon/Params.php
@@ -261,31 +261,31 @@ class Params extends \VuFind\Search\Base\Params
                         $params->set(
                             'holdings', strtolower(trim($safeValue)) == 'true'
                         );
-                    } else if ($filt['field'] == 'queryExpansion') {
+                    } elseif ($filt['field'] == 'queryExpansion') {
                         // Special case -- "query expansion" is a separate parameter
                         // from other facets.
                         $params->set(
                             'expand', strtolower(trim($safeValue)) == 'true'
                         );
-                    } else if ($filt['field'] == 'openAccessFilter') {
+                    } elseif ($filt['field'] == 'openAccessFilter') {
                         // Special case -- "open access filter" is a separate
                         // parameter from other facets.
                         $params->set(
                             'openAccessFilter',
                             strtolower(trim($safeValue)) == 'true'
                         );
-                    } else if ($filt['field'] == 'excludeNewspapers') {
+                    } elseif ($filt['field'] == 'excludeNewspapers') {
                         // Special case -- support a checkbox for excluding
                         // newspapers:
                         $params
                             ->add('filters', "ContentType,Newspaper Article,true");
-                    } else if ($range = SolrUtils::parseRange($filt['value'])) {
+                    } elseif ($range = SolrUtils::parseRange($filt['value'])) {
                         // Special case -- range query (translate [x TO y] syntax):
                         $from = SummonQuery::escapeParam($range['from']);
                         $to = SummonQuery::escapeParam($range['to']);
                         $params
                             ->add('rangeFilters', "{$filt['field']},{$from}:{$to}");
-                    } else if ($filt['operator'] == 'OR') {
+                    } elseif ($filt['operator'] == 'OR') {
                         // Special case -- OR facets:
                         $orFacets[$filt['field']] = isset($orFacets[$filt['field']])
                             ? $orFacets[$filt['field']] : [];
@@ -331,7 +331,7 @@ class Params extends \VuFind\Search\Base\Params
         if (preg_match('/^\[(.*) TO (.*)\]$/', $value, $matches)) {
             // Simple case: [X TO Y]
             $filter['displayText'] = $matches[1] . '-' . $matches[2];
-        } else if (preg_match($caseInsensitiveRegex, $value, $matches)) {
+        } elseif (preg_match($caseInsensitiveRegex, $value, $matches)) {
             // Case insensitive case: [x TO y] OR [X TO Y]; convert
             // only if values in both ranges match up!
             if (strtolower($matches[3]) == strtolower($matches[1])
diff --git a/module/VuFind/src/VuFind/Search/UrlQueryHelper.php b/module/VuFind/src/VuFind/Search/UrlQueryHelper.php
index 3f9a441d7a51d4fc976f43ee3b818944420bd44f..57fa30a3e4115cd7e9a25f1803a9cc6412572a0c 100644
--- a/module/VuFind/src/VuFind/Search/UrlQueryHelper.php
+++ b/module/VuFind/src/VuFind/Search/UrlQueryHelper.php
@@ -149,7 +149,7 @@ class UrlQueryHelper
                     }
                 }
             }
-        } else if ($this->queryObject instanceof Query) {
+        } elseif ($this->queryObject instanceof Query) {
             $search = $this->queryObject->getString();
             if (!empty($search)) {
                 $this->urlParams[$this->getBasicSearchParam()] = $search;
@@ -371,7 +371,7 @@ class UrlQueryHelper
         // Account for operators:
         if ($operator == 'NOT') {
             $field = '-' . $field;
-        } else if ($operator == 'OR') {
+        } elseif ($operator == 'OR') {
             $field = '~' . $field;
         }
 
diff --git a/module/VuFind/src/VuFind/Solr/Utils.php b/module/VuFind/src/VuFind/Solr/Utils.php
index 96c04a0ab96ea9196338e26b0c8522dbb928c985..5c41d262c5c90afb97c192879c627f24a46c4693 100644
--- a/module/VuFind/src/VuFind/Solr/Utils.php
+++ b/module/VuFind/src/VuFind/Solr/Utils.php
@@ -102,7 +102,7 @@ class Utils
                     if ($year) {
                         $date = str_replace('1999', $year, $date);
                     }
-                } else if ($year) {
+                } elseif ($year) {
                     // If the best we can do is extract a 4-digit year, that's better
                     // than nothing....
                     $date = $year;
diff --git a/module/VuFind/src/VuFind/View/Helper/Root/AddEllipsis.php b/module/VuFind/src/VuFind/View/Helper/Root/AddEllipsis.php
index 71eec1f0931e33d96058d4730134218cacfcf4c2..b52e19e99ad29d7d53b00314032475de62097c15 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/AddEllipsis.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/AddEllipsis.php
@@ -70,7 +70,7 @@ class AddEllipsis extends AbstractHelper
                 // otherwise, unless we already have the full string, add ellipses.
                 if (strlen($fullString) < 160) {
                     $title .= substr($fullString, $pos + strlen($dehighlighted));
-                } else if ($pos + strlen($dehighlighted) < strlen($fullString)) {
+                } elseif ($pos + strlen($dehighlighted) < strlen($fullString)) {
                     $title = trim($title) . '...';
                 }
                 return $title;
diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SearchBox.php b/module/VuFind/src/VuFind/View/Helper/Root/SearchBox.php
index f84bc5c30e514fdaeb01b3d27176424db10fa8a0..558893effae8874040fa8e6e31b0e11cc40fdb2e 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/SearchBox.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/SearchBox.php
@@ -318,7 +318,7 @@ class SearchBox extends \Zend\View\Helper\AbstractHelper
                         && $activeHandler == $searchVal;
                     if ($selected) {
                         $selectedFound = true;
-                    } else if ($backupSelectedIndex === false
+                    } elseif ($backupSelectedIndex === false
                         && $target == $activeSearchClass
                     ) {
                         $backupSelectedIndex = count($handlers);
@@ -330,7 +330,7 @@ class SearchBox extends \Zend\View\Helper\AbstractHelper
                         'selected' => $selected
                     ];
                 }
-            } else if ($type == 'External') {
+            } elseif ($type == 'External') {
                 $handlers[] = [
                     'value' => $type . ':' . $target, 'label' => $label,
                     'indent' => false, 'selected' => false
diff --git a/module/VuFind/src/VuFind/View/Helper/Root/SearchTabs.php b/module/VuFind/src/VuFind/View/Helper/Root/SearchTabs.php
index 2ebb61e68191c058324e51a0f582d8201fb8088e..8bf82dfc63b1ab8e146e6b22f8630c62b2bed09c 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/SearchTabs.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/SearchTabs.php
@@ -127,7 +127,7 @@ class SearchTabs extends \Zend\View\Helper\AbstractHelper
                 $retVal['selected'] = $this
                     ->createSelectedTab($key, $class, $label, $permissionName);
                 $retVal['tabs'][] = $retVal['selected'];
-            } else if ($type == 'basic') {
+            } elseif ($type == 'basic') {
                 if (!isset($activeOptions)) {
                     $activeOptions
                         = $this->results->get($activeSearchClass)->getOptions();
@@ -138,7 +138,7 @@ class SearchTabs extends \Zend\View\Helper\AbstractHelper
                 $retVal['tabs'][] = $this->createBasicTab(
                     $key, $class, $label, $newUrl, $permissionName
                 );
-            } else if ($type == 'advanced') {
+            } elseif ($type == 'advanced') {
                 $retVal['tabs'][] = $this->createAdvancedTab(
                     $key, $class, $label, $filters, $permissionName
                 );
diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Truncate.php b/module/VuFind/src/VuFind/View/Helper/Root/Truncate.php
index 75c39c80d4d1f71c9aa2d47fed975c8d6a471ba4..e39b2cd6e62d51320e7194afe75f82cc42ad8a4c 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/Truncate.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/Truncate.php
@@ -54,7 +54,7 @@ class Truncate extends AbstractHelper
     {
         if ($len == 0) {
             return '';
-        } else if (strlen($str) > $len) {
+        } elseif (strlen($str) > $len) {
             if (function_exists('mb_substr')) {
                 return trim(mb_substr($str, 0, $len, 'UTF-8')) . $append;
             } else {
diff --git a/module/VuFind/src/VuFindTest/RecordDriver/TestHarness.php b/module/VuFind/src/VuFindTest/RecordDriver/TestHarness.php
index 3710d7aa60bf71c7fc4ca35d4dbfab27c25f5cb0..0f0d97bb1ae2f040a9a7494728b1efa91a5e0c3c 100644
--- a/module/VuFind/src/VuFindTest/RecordDriver/TestHarness.php
+++ b/module/VuFind/src/VuFindTest/RecordDriver/TestHarness.php
@@ -51,7 +51,7 @@ class TestHarness extends \VuFind\RecordDriver\AbstractBase
         if (substr($method, 0, 3) == 'get') {
             $index = substr($method, 3);
             return isset($this->fields[$index]) ? $this->fields[$index] : null;
-        } else if (substr($method, 0, 3) == 'set') {
+        } elseif (substr($method, 0, 3) == 'set') {
             $index = substr($method, 3);
             $this->fields[$index] = $params[0];
         }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/UpgradeTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/UpgradeTest.php
index abe1adc0296ac2416b004c7572c0b091d7ab749d..2637e931f744121763d18749b68481922d4f0aba 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Config/UpgradeTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Config/UpgradeTest.php
@@ -99,7 +99,7 @@ class UpgradeTest extends \VuFindTest\Unit\TestCase
                 . "the default theme. Your config.ini [Site] theme setting "
                 . "has been reset to the default: bootprint3. You may need to "
                 . "reimplement your custom theme.";
-        } else if ((float)$version < 2.4) {
+        } elseif ((float)$version < 2.4) {
             $expectedWarnings[] = "WARNING: This version of VuFind does not support "
                 . "the blueprint theme. Your config.ini [Site] theme setting "
                 . "has been reset to the default: bootprint3. You may need to "
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/I18n/ExtendedIniNormalizerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/I18n/ExtendedIniNormalizerTest.php
index cbce66587ed22f127d3ecc74e6673fca45f1c692..2f8a49afa1344c881f61f5a56aca5298b204f63a 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/I18n/ExtendedIniNormalizerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/I18n/ExtendedIniNormalizerTest.php
@@ -70,7 +70,7 @@ class ExtendedIniNormalizerTest extends \VuFindTest\Unit\TestCase
             $full = $dir . '/' . $file;
             if ($file != '.' && $file != '..' && is_dir($full)) {
                 $this->checkDirectory($normalizer, $full);
-            } else if (substr($file, -4) == '.ini') {
+            } elseif (substr($file, -4) == '.ini') {
                 $this->assertEquals(
                     $normalizer->normalizeFileToString($full),
                     file_get_contents($full),
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php
index e4359a3449ae447e6b9899ab344300b9822d2367..6809d371b38ab1024e373f23ffd5894502766e02 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/MultiBackendTest.php
@@ -2252,9 +2252,9 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
                     function ($param) use ($voyager, $demo, $dummyILS) {
                         if ($param == 'Voyager') {
                             return $voyager;
-                        } else if ($param == 'Demo') {
+                        } elseif ($param == 'Demo') {
                             return $demo;
-                        } else if ($param == 'DummyILS') {
+                        } elseif ($param == 'DummyILS') {
                             return $dummyILS;
                         }
                         return null;
diff --git a/module/VuFindApi/src/VuFindApi/Formatter/BaseFormatter.php b/module/VuFindApi/src/VuFindApi/Formatter/BaseFormatter.php
index 2902ec31084b28168a716631c58e33363220e31d..c824547e28944cebc69cb02185497aebc24f82b1 100644
--- a/module/VuFindApi/src/VuFindApi/Formatter/BaseFormatter.php
+++ b/module/VuFindApi/src/VuFindApi/Formatter/BaseFormatter.php
@@ -61,7 +61,7 @@ class BaseFormatter
                 || $value === null || $value === ''
             ) {
                 unset($array[$key]);
-            } else if (is_bool($value) || $value === 'true' || $value === 'false') {
+            } elseif (is_bool($value) || $value === 'true' || $value === 'false') {
                 $array[$key] = $value === true || $value === 'true' ? 1 : 0;
             }
         }
diff --git a/module/VuFindConsole/src/VuFindConsole/Controller/LanguageController.php b/module/VuFindConsole/src/VuFindConsole/Controller/LanguageController.php
index 5a87a1816f01a8d3e036e4ec75722c432284ecfe..8134bc2f5766b7bc3b1002a04f1b3800f8373952 100644
--- a/module/VuFindConsole/src/VuFindConsole/Controller/LanguageController.php
+++ b/module/VuFindConsole/src/VuFindConsole/Controller/LanguageController.php
@@ -279,7 +279,7 @@ class LanguageController extends AbstractBase
         $normalizer = new ExtendedIniNormalizer();
         if (is_dir($target)) {
             $normalizer->normalizeDirectory($target);
-        } else if (is_file($target)) {
+        } elseif (is_file($target)) {
             $normalizer->normalizeFile($target);
         } else {
             Console::writeLine("{$target} does not exist.");
diff --git a/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php b/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php
index a39a8434b2142fa78e9c0cc01560e95daa578087..7954ac00ff8122737cd0eb1510acd3ce1ab1614f 100644
--- a/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php
+++ b/module/VuFindConsole/src/VuFindConsole/Controller/UtilController.php
@@ -565,7 +565,7 @@ class UtilController extends AbstractBase
         if (!is_array($result)) {
             Console::writeLine("Could not obtain suppressed record list from ILS.");
             return $this->getFailureResponse();
-        } else if (empty($result)) {
+        } elseif (empty($result)) {
             Console::writeLine("No suppressed records to delete.");
             return $this->getSuccessResponse();
         }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php
index 27d4b6d2d95487a0ef74f0aa6c9a6cfe0ebebfb7..468454d6ad920836aa7c5e19ab2b62be68ad9f2a 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php
@@ -72,7 +72,7 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
             $recordFactory = function ($i) {
                 return new Record($i);
             };
-        } else if (!is_callable($recordFactory)) {
+        } elseif (!is_callable($recordFactory)) {
             throw new InvalidArgumentException('Record factory must be callable.');
         }
         $this->recordFactory = $recordFactory;
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php
index 46b5b8eaae0965767cc4ce65c4029f4ebfe0a262..40e089a72488766361988babda54b04819b08dbf 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php
@@ -100,7 +100,7 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
         ) {
             // Format of the search response
             $records = $response['SearchResult']['Data']['Records'];
-        } else if (isset($response['Records'])) { // Format of the retrieve response
+        } elseif (isset($response['Records'])) { // Format of the retrieve response
             $records = $response['Records'];
         }
 
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/SearchRequestModel.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/SearchRequestModel.php
index ca54d9b8d8b30d884bcba65c1fa50b3f46d99819..411b92c9d4e799d5326ded802a2a009b851197fe 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/SearchRequestModel.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/SearchRequestModel.php
@@ -178,11 +178,11 @@ class SearchRequestModel
                 foreach ($values as $filter) {
                     if (substr($filter, 0, 6) == 'LIMIT|') {
                         $this->addLimiter(substr($filter, 6));
-                    } else if (substr($filter, 0, 7) == 'EXPAND:') {
+                    } elseif (substr($filter, 0, 7) == 'EXPAND:') {
                         $this->addExpander(substr($filter, 7));
-                    } else if (substr($filter, 0, 11) == 'SEARCHMODE:') {
+                    } elseif (substr($filter, 0, 11) == 'SEARCHMODE:') {
                         $this->searchMode = substr($filter, 11, null);
-                    } else if (substr($filter, 0, 15) == 'PublicationDate') {
+                    } elseif (substr($filter, 0, 15) == 'PublicationDate') {
                         $this->addLimiter($this->formatDateLimiter($filter));
                     } else {
                         $this->addFilter("$cnt,$filter");
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Response/RecordCollectionFactory.php
index ed199ac3f9bc378ce5d3ab032300606811c54fbe..dcc1bcd316ee7c6fbbe4cc57dd98f0c1c5461c23 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Response/RecordCollectionFactory.php
@@ -72,7 +72,7 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
             $recordFactory = function ($i) {
                 return new Record($i);
             };
-        } else if (!is_callable($recordFactory)) {
+        } elseif (!is_callable($recordFactory)) {
             throw new InvalidArgumentException('Record factory must be callable.');
         }
         $this->recordFactory = $recordFactory;
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php
index 2a5c6b4e6762ed88c6882a771013a63a80b7422f..65b8abefbadf55cad377fedfd8db2ec7646c2bc0 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php
@@ -71,7 +71,7 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
             $recordFactory = function ($i) {
                 return new Record($i);
             };
-        } else if (!is_callable($recordFactory)) {
+        } elseif (!is_callable($recordFactory)) {
             throw new InvalidArgumentException('Record factory must be callable.');
         }
         $this->recordFactory = $recordFactory;
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Response/RecordCollectionFactory.php
index 25b83040a3573dca365cd5bf962cef2f24c3cc47..74f67f9050de9673c84d51d8eb5eba9b4f428838 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Response/RecordCollectionFactory.php
@@ -72,7 +72,7 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
             $recordFactory = function ($i) {
                 return new Record($i);
             };
-        } else if (!is_callable($recordFactory)) {
+        } elseif (!is_callable($recordFactory)) {
             throw new InvalidArgumentException('Record factory must be callable.');
         }
         $this->recordFactory = $recordFactory;
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/LuceneSyntaxHelper.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/LuceneSyntaxHelper.php
index a508351c94937f875acbc92276b26dbdcabd3d15..fc844b2936e268f608f3484f75311d4d95fc9479 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/LuceneSyntaxHelper.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/LuceneSyntaxHelper.php
@@ -587,7 +587,7 @@ class LuceneSyntaxHelper
             || $this->caseSensitiveBooleans === "0"
         ) {
             return $this->allBools;
-        } else if ($this->caseSensitiveBooleans === true
+        } elseif ($this->caseSensitiveBooleans === true
             || $this->caseSensitiveBooleans === 1
             || $this->caseSensitiveBooleans === "1"
         ) {
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/QueryBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/QueryBuilder.php
index 3367b23e789a8fc3fc1bb2e66385d1e23c2773ab..af8fc03dacccc292c9d4050a655b56bc64a1ac45 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/QueryBuilder.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/QueryBuilder.php
@@ -153,7 +153,7 @@ class QueryBuilder implements QueryBuilderInterface
                         $params->set('hl.q', $oldString);
                     }
                 }
-            } else if ($handler->hasDismax()) {
+            } elseif ($handler->hasDismax()) {
                 $params->set('qf', implode(' ', $handler->getDismaxFields()));
                 $params->set('qt', $handler->getDismaxHandler());
                 foreach ($handler->getDismaxParams() as $param) {
@@ -351,7 +351,7 @@ class QueryBuilder implements QueryBuilderInterface
         }
         if ($advanced && $handler) {
             return $handler->createAdvancedQueryString($string);
-        } else if ($handler) {
+        } elseif ($handler) {
             return $handler->createSimpleQueryString($string);
         } else {
             return $string;
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/SearchHandler.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/SearchHandler.php
index 9ff6012e2b306bcb0ff153915cac6fc5245b2e28..41b97b9eac850a949cddbd936b4c1942c1502c87 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/SearchHandler.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/SearchHandler.php
@@ -140,7 +140,7 @@ class SearchHandler
                 list($name, $value) = $param;
                 if ($name === 'bq') {
                     $boostQuery[] = $value;
-                } else if ($name === 'bf') {
+                } elseif ($name === 'bf') {
                     // BF parameter may contain multiple space-separated functions
                     // with individual boosts.  We need to parse this into _val_
                     // query components:
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Response/RecordCollectionFactory.php
index 77f11892b9a30dc33744804e59ada85f8bf01365..74e77b2a1e07220509de7c7e87edce67dadde234 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Response/RecordCollectionFactory.php
@@ -72,7 +72,7 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
             $recordFactory = function ($i) {
                 return new Record($i);
             };
-        } else if (!is_callable($recordFactory)) {
+        } elseif (!is_callable($recordFactory)) {
             throw new InvalidArgumentException('Record factory must be callable.');
         }
         $this->recordFactory = $recordFactory;
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php
index fb2e6ab810912514220b06b29def488579895a2a..8cc145e5e396dc9f1bfa8464385e131fb02ed2ed 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php
@@ -72,7 +72,7 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
                 $marc = new File_MARCXML($i, File_MARCXML::SOURCE_STRING);
                 return new Record($marc->next());
             };
-        } else if (!is_callable($recordFactory)) {
+        } elseif (!is_callable($recordFactory)) {
             throw new InvalidArgumentException('Record factory must be callable.');
         }
         $this->recordFactory = $recordFactory;
diff --git a/module/VuFindSearch/src/VuFindSearch/Service.php b/module/VuFindSearch/src/VuFindSearch/Service.php
index 775b6733a933a667f72214c5b043456799978663..2eaf853ff3770f4d9c0bca3d1df476fedfb223be 100644
--- a/module/VuFindSearch/src/VuFindSearch/Service.php
+++ b/module/VuFindSearch/src/VuFindSearch/Service.php
@@ -186,7 +186,7 @@ class Service
                 }
                 if (!$response) {
                     $response = $next;
-                } else if ($record = $next->first()) {
+                } elseif ($record = $next->first()) {
                     $response->add($record);
                 }
             }
@@ -269,7 +269,7 @@ class Service
                     }
                     if (!$response) {
                         $response = $currentBatch;
-                    } else if ($record = $currentBatch->first()) {
+                    } elseif ($record = $currentBatch->first()) {
                         $response->add($record);
                     }
                 }
diff --git a/module/VuFindTheme/src/VuFindTheme/AbstractThemeUtility.php b/module/VuFindTheme/src/VuFindTheme/AbstractThemeUtility.php
index d0e1e70a4ca4eea18642935f43fc6ce418fe1f14..e22d5e41ac1766869b0b57a48f03d7b0756bb72c 100644
--- a/module/VuFindTheme/src/VuFindTheme/AbstractThemeUtility.php
+++ b/module/VuFindTheme/src/VuFindTheme/AbstractThemeUtility.php
@@ -96,7 +96,7 @@ abstract class AbstractThemeUtility
                 if (!$this->copyDir("$src/$current", "$dest/$current")) {
                     return false;
                 }
-            } else if (!file_exists("$dest/$current")
+            } elseif (!file_exists("$dest/$current")
                 && !copy("$src/$current", "$dest/$current")
             ) {
                 return $this->setLastError(
@@ -126,7 +126,7 @@ abstract class AbstractThemeUtility
                 if (!$this->deleteDir("$path/$current")) {
                     return false;
                 }
-            } else if (!unlink("$path/$current")) {
+            } elseif (!unlink("$path/$current")) {
                 return $this->setLastError("Cannot delete $path/$current");
             }
         }
diff --git a/module/VuFindTheme/src/VuFindTheme/ThemeCompiler.php b/module/VuFindTheme/src/VuFindTheme/ThemeCompiler.php
index 7070d65a2cecff8211800b0e4dc3d1a26e53b542..c30ff24099fd9598c6ba24a05c140daec9d18bab 100644
--- a/module/VuFindTheme/src/VuFindTheme/ThemeCompiler.php
+++ b/module/VuFindTheme/src/VuFindTheme/ThemeCompiler.php
@@ -132,7 +132,7 @@ class ThemeCompiler extends AbstractThemeUtility
                 // trump new incoming ones:
                 if (!isset($dest[$key])) {
                     $dest[$key] = $value;
-                } else if (is_array($dest[$key])) {
+                } elseif (is_array($dest[$key])) {
                     $dest[$key] = array_merge($value, $dest[$key]);
                 }
                 break;
diff --git a/module/VuFindTheme/src/VuFindTheme/View/Helper/Factory.php b/module/VuFindTheme/src/VuFindTheme/View/Helper/Factory.php
index 5243e26a97df9a65792d6da21fb0e366920d6a51..1844e0c8c75309d26df96280e42b9e59f18cb8ef 100644
--- a/module/VuFindTheme/src/VuFindTheme/View/Helper/Factory.php
+++ b/module/VuFindTheme/src/VuFindTheme/View/Helper/Factory.php
@@ -62,9 +62,9 @@ class Factory
                 $parts = array_map('trim', explode(':', $setting));
                 if (APPLICATION_ENV === $parts[0]) {
                     return $parts[1];
-                } else if (count($parts) == 1) {
+                } elseif (count($parts) == 1) {
                     $default = $parts[0];
-                } else if ($parts[0] === '*') {
+                } elseif ($parts[0] === '*') {
                     $default = $parts[1];
                 }
             }