From 3268eae5621b177b7104b3d1dc9f2488160ad89e Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Thu, 19 Oct 2017 13:21:39 -0400
Subject: [PATCH] Style fixes.

---
 module/VuFind/src/VuFind/Auth/Shibboleth.php  |  6 +-
 .../VuFind/Config/Reader/CacheDecorator.php   |  1 -
 .../src/VuFind/Content/Covers/LocalFile.php   |  2 +-
 .../VuFind/Controller/BrowseController.php    |  6 +-
 .../VuFind/Controller/EITrecordController.php |  1 -
 .../src/VuFind/Controller/EdsController.php   |  1 -
 .../src/VuFind/Controller/ErrorController.php |  1 -
 .../VuFind/Controller/FeedbackController.php  |  1 -
 .../Controller/LibraryCardsController.php     |  2 +-
 .../Controller/MyResearchController.php       |  4 +-
 .../Controller/Plugin/AbstractRequestBase.php |  4 +-
 .../src/VuFind/Controller/Plugin/Followup.php |  1 -
 .../src/VuFind/Controller/Plugin/Holds.php    |  2 +-
 .../VuFind/Controller/SearchController.php    |  1 -
 .../Controller/Widget/WidgetInterface.php     |  1 -
 module/VuFind/src/VuFind/Cover/Generator.php  |  4 +-
 .../Feed/Writer/Extension/OpenSearch/Feed.php |  1 -
 .../TreeDataFormatter/AbstractBase.php        | 16 ++--
 .../I18n/Translator/TranslatorAwareTrait.php  |  1 -
 module/VuFind/src/VuFind/ILS/Driver/Aleph.php |  3 +-
 .../src/VuFind/ILS/Driver/ClaviusSQL.php      | 24 +++---
 module/VuFind/src/VuFind/ILS/Driver/DAIA.php  |  1 -
 .../src/VuFind/ILS/Driver/Evergreen.php       | 54 ++++++-------
 .../VuFind/src/VuFind/ILS/Driver/Horizon.php  |  2 +-
 .../src/VuFind/ILS/Driver/HorizonXMLAPI.php   | 13 +---
 module/VuFind/src/VuFind/ILS/Driver/Koha.php  | 24 ++----
 .../src/VuFind/ILS/Driver/KohaILSDI.php       | 42 +++++-----
 module/VuFind/src/VuFind/ILS/Driver/LBS4.php  |  5 +-
 .../src/VuFind/ILS/Driver/NewGenLib.php       |  3 +-
 module/VuFind/src/VuFind/ILS/Driver/PAIA.php  |  2 -
 .../VuFind/src/VuFind/ILS/Driver/Polaris.php  |  9 +--
 .../VuFind/src/VuFind/ILS/Driver/Symphony.php | 77 +++++++++----------
 .../VuFind/src/VuFind/ILS/Driver/Unicorn.php  |  2 +-
 .../VuFind/src/VuFind/ILS/Driver/Voyager.php  |  3 +-
 .../src/VuFind/ILS/Driver/VoyagerRestful.php  | 12 +--
 .../VuFind/src/VuFind/ILS/Driver/XCNCIP2.php  |  5 --
 module/VuFind/src/VuFind/ILS/Logic/Holds.php  |  2 +-
 .../src/VuFind/ILS/Logic/TitleHolds.php       |  5 +-
 .../VuFind/src/VuFind/Log/LoggerFactory.php   |  2 +-
 module/VuFind/src/VuFind/OAI/Server.php       |  2 +-
 .../src/VuFind/Recommend/MapSelection.php     |  1 -
 .../Record/Cache/RecordCacheAwareTrait.php    |  1 -
 module/VuFind/src/VuFind/RecordDriver/EDS.php |  1 -
 module/VuFind/src/VuFind/RecordDriver/EIT.php |  3 +-
 .../src/VuFind/RecordDriver/SolrMarc.php      |  2 +-
 module/VuFind/src/VuFind/RecordTab/Map.php    |  2 +-
 .../Resolver/Driver/DriverInterface.php       |  1 -
 .../src/VuFind/Resolver/Driver/Redi.php       |  1 -
 .../VuFind/src/VuFind/Search/EDS/Options.php  |  2 -
 .../VuFind/src/VuFind/Search/EDS/Params.php   |  2 -
 .../src/VuFind/Search/EDS/QueryAdapter.php    |  2 +-
 module/VuFind/src/VuFind/Search/Minified.php  |  2 +-
 .../Search/Primo/InjectOnCampusListener.php   |  1 -
 .../Search/Primo/PrimoPermissionHandler.php   |  1 -
 .../Search/Solr/DeduplicationListener.php     |  1 -
 .../Solr/InjectConditionalFilterListener.php  |  1 -
 .../VuFind/Search/Solr/V4/ErrorListener.php   |  1 -
 module/VuFind/src/VuFind/Service/Factory.php  | 14 ++--
 .../src/VuFind/View/Helper/Root/Browse.php    |  2 +-
 .../View/Helper/Root/JqueryValidation.php     |  2 +-
 .../src/VuFind/View/Helper/Root/Record.php    |  2 +-
 .../src/VuFindTest/Auth/ShibbolethTest.php    |  4 +-
 .../src/VuFindTest/Mink/CartTest.php          | 27 +++----
 .../src/VuFindTest/Mink/RecordTest.php        |  1 -
 .../Controller/Plugin/ResultScrollerTest.php  |  3 +-
 .../src/VuFindTest/ILS/Driver/DemoTest.php    |  4 +-
 .../ILS/Driver/MultiBackendTest.php           | 26 ++++---
 .../src/VuFindTest/ILS/Driver/PAIATest.php    | 16 ++--
 .../src/VuFindTest/Mailer/MailerTest.php      |  3 +-
 .../Role/PermissionProvider/UserTest.php      |  1 -
 .../Primo/PrimoPermissionHandlerTest.php      | 24 ++++--
 .../Solr/HierarchicalFacetHelperTest.php      |  1 -
 .../View/Helper/Root/PermissionTest.php       |  6 +-
 .../Controller/ConfigController.php           |  1 -
 .../VuFindAdmin/Controller/TagsController.php |  1 -
 .../src/VuFindDevTools/LanguageHelper.php     |  2 +-
 .../VuFindSearch/Backend/BackendInterface.php |  1 -
 .../Response/RecordCollectionFactory.php      |  2 -
 .../src/VuFindSearch/Backend/EDS/Backend.php  | 34 ++++----
 .../src/VuFindSearch/Backend/EDS/Base.php     |  5 +-
 .../VuFindSearch/Backend/EDS/Exception.php    |  1 -
 .../VuFindSearch/Backend/EDS/QueryBuilder.php |  1 -
 .../Backend/EDS/Response/RecordCollection.php |  2 -
 .../EDS/Response/RecordCollectionFactory.php  |  1 -
 .../Backend/EDS/SearchRequestModel.php        | 16 ++--
 .../src/VuFindSearch/Backend/EDS/Zend2.php    | 10 +--
 .../EIT/Response/XML/RecordCollection.php     |  1 -
 .../Response/RecordCollectionFactory.php      |  2 -
 .../Response/RecordCollectionFactory.php      |  1 -
 .../VuFindSearch/Backend/Primo/Connector.php  |  1 -
 .../Response/RecordCollectionFactory.php      |  2 -
 .../Backend/Solr/Document/CommitDocument.php  |  1 -
 .../Solr/Document/OptimizeDocument.php        |  1 -
 .../Backend/Solr/Document/UpdateDocument.php  |  1 -
 .../Backend/Solr/LuceneSyntaxHelper.php       |  2 +-
 .../Response/Json/RecordCollectionFactory.php |  1 -
 .../Backend/Solr/Response/Json/Spellcheck.php |  1 -
 .../Response/RecordCollectionFactory.php      |  1 -
 .../Response/XML/RecordCollectionFactory.php  |  1 -
 .../Response/AbstractRecordCollection.php     |  1 -
 .../Response/RecordCollectionInterface.php    |  1 -
 .../VuFindSearch/Response/RecordInterface.php |  1 -
 .../VuFindSearch/src/VuFindSearch/Service.php |  3 +-
 .../VuFindTest/Backend/EDS/BackendTest.php    |  1 -
 .../Response/RecordCollectionFactoryTest.php  |  1 -
 .../XML/RecordCollectionFactoryTest.php       |  1 -
 .../Backend/Solr/LuceneSyntaxHelperTest.php   | 18 +++--
 .../Response/RecordCollectionFactoryTest.php  |  1 -
 108 files changed, 272 insertions(+), 358 deletions(-)

diff --git a/module/VuFind/src/VuFind/Auth/Shibboleth.php b/module/VuFind/src/VuFind/Auth/Shibboleth.php
index 1736aa0947b..5422f352cce 100644
--- a/module/VuFind/src/VuFind/Auth/Shibboleth.php
+++ b/module/VuFind/src/VuFind/Auth/Shibboleth.php
@@ -205,13 +205,11 @@ class Shibboleth extends AbstractBase
             $shibTarget = $target;
         }
         $append = (strpos($shibTarget, '?') !== false) ? '&' : '?';
+        // Adding the auth_method parameter makes it possible to handle logins when
+        // using an auth method that proxies others.
         $sessionInitiator = $config->Shibboleth->login
             . '?target=' . urlencode($shibTarget)
             . urlencode($append . 'auth_method=Shibboleth');
-                                                    // makes it possible to
-                                                    // handle logins when using
-                                                    // an auth method that
-                                                    // proxies others
 
         if (isset($config->Shibboleth->provider_id)) {
             $sessionInitiator = $sessionInitiator . '&entityID=' .
diff --git a/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php b/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php
index 3f5243e3899..efbe0f244a4 100644
--- a/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php
+++ b/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php
@@ -121,5 +121,4 @@ class CacheDecorator implements ReaderInterface
     {
         return md5($string);
     }
-
 }
diff --git a/module/VuFind/src/VuFind/Content/Covers/LocalFile.php b/module/VuFind/src/VuFind/Content/Covers/LocalFile.php
index 94d5c30e5b8..793e614215b 100644
--- a/module/VuFind/src/VuFind/Content/Covers/LocalFile.php
+++ b/module/VuFind/src/VuFind/Content/Covers/LocalFile.php
@@ -144,7 +144,7 @@ class LocalFile extends \VuFind\Content\AbstractCover
                 foreach ([$val, strtoupper($val), ucwords($val)] as $finalVal) {
                     $checkFile = str_replace('%anyimage%', $finalVal, $fileName);
                     if (file_exists($checkFile)) {
-                         return $checkFile;
+                        return $checkFile;
                     }
                 }
             }
diff --git a/module/VuFind/src/VuFind/Controller/BrowseController.php b/module/VuFind/src/VuFind/Controller/BrowseController.php
index 28f0356e970..2f7b96f9ac8 100644
--- a/module/VuFind/src/VuFind/Controller/BrowseController.php
+++ b/module/VuFind/src/VuFind/Controller/BrowseController.php
@@ -259,7 +259,7 @@ class BrowseController extends AbstractBase
                 ? 'filter[]=' . $this->params()->fromQuery('query_field') . ':'
                     . urlencode($this->params()->fromQuery('query')) . '&'
                 : '';
-            switch($this->getCurrentAction()) {
+            switch ($this->getCurrentAction()) {
             case 'LCC':
                 $view->paramTitle .= 'filter[]=callnumber-subject:';
                 break;
@@ -539,7 +539,7 @@ class BrowseController extends AbstractBase
     protected function getSecondaryList($facet)
     {
         $category = $this->getCategory();
-        switch($facet) {
+        switch ($facet) {
         case 'alphabetical':
             return ['', $this->getAlphabetList()];
         case 'dewey':
@@ -660,7 +660,7 @@ class BrowseController extends AbstractBase
         if ($action == null) {
             $action = $this->getCurrentAction();
         }
-        switch(strToLower($action)) {
+        switch (strToLower($action)) {
         case 'alphabetical':
             return $this->getCategory();
         case 'dewey':
diff --git a/module/VuFind/src/VuFind/Controller/EITrecordController.php b/module/VuFind/src/VuFind/Controller/EITrecordController.php
index d71a8af4257..383048904bd 100644
--- a/module/VuFind/src/VuFind/Controller/EITrecordController.php
+++ b/module/VuFind/src/VuFind/Controller/EITrecordController.php
@@ -70,5 +70,4 @@ class EITrecordController extends AbstractRecord
         return (isset($config->Record->next_prev_navigation)
             && $config->Record->next_prev_navigation);
     }
-
 }
diff --git a/module/VuFind/src/VuFind/Controller/EdsController.php b/module/VuFind/src/VuFind/Controller/EdsController.php
index 4b561337e9f..692309c57b1 100644
--- a/module/VuFind/src/VuFind/Controller/EdsController.php
+++ b/module/VuFind/src/VuFind/Controller/EdsController.php
@@ -288,7 +288,6 @@ class EdsController extends AbstractSearch
             // Explicitly execute search within controller -- this allows us to
             // catch exceptions more reliably:
             $results->performAndProcessSearch();
-
         } catch (\VuFindSearch\Backend\Exception\BackendException $e) {
             if ($e->hasTag('VuFind\Search\ParserError')) {
                 // If it's a parse error or the user specified an invalid field, we
diff --git a/module/VuFind/src/VuFind/Controller/ErrorController.php b/module/VuFind/src/VuFind/Controller/ErrorController.php
index 2255beed4bd..e01491e98d0 100644
--- a/module/VuFind/src/VuFind/Controller/ErrorController.php
+++ b/module/VuFind/src/VuFind/Controller/ErrorController.php
@@ -63,5 +63,4 @@ class ErrorController extends AbstractActionController
             ['msg' => $this->params()->fromQuery('msg')]
         );
     }
-
 }
diff --git a/module/VuFind/src/VuFind/Controller/FeedbackController.php b/module/VuFind/src/VuFind/Controller/FeedbackController.php
index 179fd10a2be..e27b1c4b915 100644
--- a/module/VuFind/src/VuFind/Controller/FeedbackController.php
+++ b/module/VuFind/src/VuFind/Controller/FeedbackController.php
@@ -53,7 +53,6 @@ class FeedbackController extends AbstractBase
 
         // Process form submission:
         if ($this->formWasSubmitted('submit', $view->useRecaptcha)) {
-
             if (empty($view->email) || empty($view->comments)) {
                 $this->flashMessenger()->addMessage('bulk_error_missing', 'error');
                 return;
diff --git a/module/VuFind/src/VuFind/Controller/LibraryCardsController.php b/module/VuFind/src/VuFind/Controller/LibraryCardsController.php
index 0d447863b51..0874597b30a 100644
--- a/module/VuFind/src/VuFind/Controller/LibraryCardsController.php
+++ b/module/VuFind/src/VuFind/Controller/LibraryCardsController.php
@@ -239,7 +239,7 @@ class LibraryCardsController extends AbstractBase
             $user->saveLibraryCard(
                 $id == 'NEW' ? null : $id, $cardName, $username, $password
             );
-        } catch(\VuFind\Exception\LibraryCard $e) {
+        } catch (\VuFind\Exception\LibraryCard $e) {
             $this->flashMessenger()->addMessage($e->getMessage(), 'error');
             return false;
         }
diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php
index 3f10ff13253..ae34cf68b6f 100644
--- a/module/VuFind/src/VuFind/Controller/MyResearchController.php
+++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php
@@ -819,7 +819,7 @@ class MyResearchController extends AbstractBase
 
             return $this->redirect()->toRoute('userList', ['id' => $finalId]);
         } catch (\Exception $e) {
-            switch(get_class($e)) {
+            switch (get_class($e)) {
             case 'VuFind\Exception\ListPermission':
             case 'VuFind\Exception\MissingField':
                 $this->flashMessenger()->addMessage($e->getMessage(), 'error');
@@ -902,7 +902,7 @@ class MyResearchController extends AbstractBase
                 // Success Message
                 $this->flashMessenger()->addMessage('fav_list_delete', 'success');
             } catch (\Exception $e) {
-                switch(get_class($e)) {
+                switch (get_class($e)) {
                 case 'VuFind\Exception\LoginRequired':
                 case 'VuFind\Exception\ListPermission':
                     $user = $this->getUser();
diff --git a/module/VuFind/src/VuFind/Controller/Plugin/AbstractRequestBase.php b/module/VuFind/src/VuFind/Controller/Plugin/AbstractRequestBase.php
index 4a50b3f52da..1ea3816398b 100644
--- a/module/VuFind/src/VuFind/Controller/Plugin/AbstractRequestBase.php
+++ b/module/VuFind/src/VuFind/Controller/Plugin/AbstractRequestBase.php
@@ -200,7 +200,7 @@ abstract class AbstractRequestBase extends AbstractPlugin
         }
 
         // If we got this far, something is wrong!
-         return false;
+        return false;
     }
 
     /**
@@ -248,7 +248,7 @@ abstract class AbstractRequestBase extends AbstractPlugin
         }
 
         // If we got this far, something is wrong!
-         return false;
+        return false;
     }
 
     /**
diff --git a/module/VuFind/src/VuFind/Controller/Plugin/Followup.php b/module/VuFind/src/VuFind/Controller/Plugin/Followup.php
index 6e1320df112..5673c67ab7c 100644
--- a/module/VuFind/src/VuFind/Controller/Plugin/Followup.php
+++ b/module/VuFind/src/VuFind/Controller/Plugin/Followup.php
@@ -91,7 +91,6 @@ class Followup extends AbstractPlugin
         }
         return isset($this->session->$key)
             ? $this->session->$key : $default;
-
     }
 
     /**
diff --git a/module/VuFind/src/VuFind/Controller/Plugin/Holds.php b/module/VuFind/src/VuFind/Controller/Plugin/Holds.php
index 264e4f3b5da..b772c09c15d 100644
--- a/module/VuFind/src/VuFind/Controller/Plugin/Holds.php
+++ b/module/VuFind/src/VuFind/Controller/Plugin/Holds.php
@@ -169,7 +169,7 @@ class Holds extends AbstractRequestBase
                 return $cancelResults;
             }
         } else {
-             $flashMsg->addMessage('hold_empty_selection', 'error');
+            $flashMsg->addMessage('hold_empty_selection', 'error');
         }
         return [];
     }
diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php
index c894ff381ba..f2107506ed5 100644
--- a/module/VuFind/src/VuFind/Controller/SearchController.php
+++ b/module/VuFind/src/VuFind/Controller/SearchController.php
@@ -702,5 +702,4 @@ class SearchController extends AbstractSearch
             ? $facetConfig->SpecialFacets->hierarchicalFacetSortOptions->toArray()
             : [];
     }
-
 }
diff --git a/module/VuFind/src/VuFind/Controller/Widget/WidgetInterface.php b/module/VuFind/src/VuFind/Controller/Widget/WidgetInterface.php
index e2a17aa3b61..37c86406052 100644
--- a/module/VuFind/src/VuFind/Controller/Widget/WidgetInterface.php
+++ b/module/VuFind/src/VuFind/Controller/Widget/WidgetInterface.php
@@ -64,5 +64,4 @@ interface WidgetInterface
      * @return array
      */
     public function getState();
-
 }
diff --git a/module/VuFind/src/VuFind/Cover/Generator.php b/module/VuFind/src/VuFind/Cover/Generator.php
index cb6d76b6232..0fd5dacadf9 100644
--- a/module/VuFind/src/VuFind/Cover/Generator.php
+++ b/module/VuFind/src/VuFind/Cover/Generator.php
@@ -211,7 +211,7 @@ class Generator
      */
     protected function getColor($color)
     {
-        switch (strtolower($color)){
+        switch (strtolower($color)) {
         case 'black':
             return imagecolorallocate($this->im, 0, 0, 0);
         case 'silver':
@@ -754,7 +754,7 @@ class Generator
         $p = (int)($v * (1.0 - $s));
         $q = (int)($v * (1.0 - $s * $f));
         $t = (int)($v * (1.0 - $s * (1.0 - $f)));
-        switch($i) {
+        switch ($i) {
         case 0:
             return imagecolorallocate($this->im, $v, $t, $p);
         case 1:
diff --git a/module/VuFind/src/VuFind/Feed/Writer/Extension/OpenSearch/Feed.php b/module/VuFind/src/VuFind/Feed/Writer/Extension/OpenSearch/Feed.php
index 922820b5a36..3b996ae3f90 100644
--- a/module/VuFind/src/VuFind/Feed/Writer/Extension/OpenSearch/Feed.php
+++ b/module/VuFind/src/VuFind/Feed/Writer/Extension/OpenSearch/Feed.php
@@ -260,5 +260,4 @@ class Feed extends ParentFeed
     {
         return $this->links;
     }
-
 }
diff --git a/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/AbstractBase.php b/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/AbstractBase.php
index e749bcf0f49..dc6e86c1e61 100644
--- a/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/AbstractBase.php
+++ b/module/VuFind/src/VuFind/Hierarchy/TreeDataFormatter/AbstractBase.php
@@ -129,14 +129,14 @@ abstract class AbstractBase
         return $retVal;
     }
 
-     /**
-      * Get the titles of this item within parent collections. Returns an array
-      * of parent ID => sequence number.
-      *
-      * @param object $fields Solr fields
-      *
-      * @return Array
-      */
+    /**
+     * Get the titles of this item within parent collections. Returns an array
+     * of parent ID => sequence number.
+     *
+     * @param object $fields Solr fields
+     *
+     * @return Array
+     */
     protected function getTitlesInHierarchy($fields)
     {
         $retVal = [];
diff --git a/module/VuFind/src/VuFind/I18n/Translator/TranslatorAwareTrait.php b/module/VuFind/src/VuFind/I18n/Translator/TranslatorAwareTrait.php
index ca21be00de9..52e7ed4a528 100644
--- a/module/VuFind/src/VuFind/I18n/Translator/TranslatorAwareTrait.php
+++ b/module/VuFind/src/VuFind/I18n/Translator/TranslatorAwareTrait.php
@@ -135,7 +135,6 @@ trait TranslatorAwareTrait
     protected function translateString($str, $tokens = [], $default = null,
         $domain = 'default'
     ) {
-
         $msg = (null === $this->translator)
             ? $str : $this->translator->translate($str, $domain);
 
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php
index 276833e61ac..a98c8bf5390 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php
@@ -92,7 +92,8 @@ class AlephTranslator
             if (preg_match("/!!/", $line)) {
                 $line = chop($line);
                 $rgxp = AlephTranslator::regexp($line);
-            } if (preg_match("/!.*/", $line) || $rgxp == "" || $line == "") {
+            }
+            if (preg_match("/!.*/", $line) || $rgxp == "" || $line == "") {
             } else {
                 $line = str_pad($line, 80);
                 $matches = "";
diff --git a/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php b/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php
index 40a58e2e68a..e6b19691152 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php
@@ -136,21 +136,21 @@ class ClaviusSQL extends AbstractBase
         //how long (in days) hide new items
         $this->hideNewItemsDays = 0;
         if (isset($this->config['Catalog']['hide_days'])) {
-             $this->c = $this->config['Catalog']['hide_days'];
+            $this->c = $this->config['Catalog']['hide_days'];
         }
     }
 
-     /**
-      * Get list of departments
-      *
-      * This method queries the ILS for a list of departments to be used as input
-      * to the findReserves method
-      *
-      * @throws ILSException
-      *
-      * @return array An associative array with key = department ID,
-      * value = department name.
-      */
+    /**
+     * Get list of departments
+     *
+     * This method queries the ILS for a list of departments to be used as input
+     * to the findReserves method
+     *
+     * @throws ILSException
+     *
+     * @return array An associative array with key = department ID,
+     * value = department name.
+     */
     public function getDepartments()
     {
         if (!is_array($this->locations)) {
diff --git a/module/VuFind/src/VuFind/ILS/Driver/DAIA.php b/module/VuFind/src/VuFind/ILS/Driver/DAIA.php
index 9a50edfdaf6..4a8d32ac718 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/DAIA.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/DAIA.php
@@ -474,7 +474,6 @@ class DAIA extends AbstractBase implements
                 'HTTP status ' . $result->getStatusCode() .
                 ' received, retrieving availability information for record: ' . $id
             );
-
         }
 
         // check if result matches daiaResponseFormat
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php b/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php
index 302d29106da..bb742947b37 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php
@@ -57,16 +57,16 @@ class Evergreen extends AbstractBase
      */
     protected $dbName;
 
-     /**
-      * Initialize the driver.
-      *
-      * Validate configuration and perform all resource-intensive tasks needed to
-      * make the driver active.
-      *
-      * @throws ILSException
-      * @throws PDOException
-      * @return void
-      */
+    /**
+     * Initialize the driver.
+     *
+     * Validate configuration and perform all resource-intensive tasks needed to
+     * make the driver active.
+     *
+     * @throws ILSException
+     * @throws PDOException
+     * @return void
+     */
     public function init()
     {
         if (empty($this->config)) {
@@ -583,23 +583,23 @@ HERE;
      */
     //public function placeHold($holdDetails)
     //{
-        // Need to check asset.copy.status -> config.copy_status.holdable = true
-        // If it is holdable, place hold in action.hold_request:
-        // request_time to now, current_copy to asset.copy.id,
-        // usr to action.usr.id of requesting patron,
-        // phone_notify to phone number, email_notify to t/f
-        // set pickup_lib too?
-
-        /*
-        $sql = "";
-
-        try {
-            $sqlStmt = $this->db->prepare($sql);
-            $sqlStmt->execute();
-        } catch (PDOException $e) {
-            throw new ILSException($e->getMessage());
-        }
-        */
+    // Need to check asset.copy.status -> config.copy_status.holdable = true
+    // If it is holdable, place hold in action.hold_request:
+    // request_time to now, current_copy to asset.copy.id,
+    // usr to action.usr.id of requesting patron,
+    // phone_notify to phone number, email_notify to t/f
+    // set pickup_lib too?
+
+    /*
+    $sql = "";
+
+    try {
+        $sqlStmt = $this->db->prepare($sql);
+        $sqlStmt->execute();
+    } catch (PDOException $e) {
+        throw new ILSException($e->getMessage());
+    }
+    */
     //}
 
     /**
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php
index fee850e69d5..7ab8003a68e 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php
@@ -763,7 +763,7 @@ class Horizon extends AbstractBase
             $sqlStmt = mssql_query($sql);
 
             while ($row = mssql_fetch_assoc($sqlStmt)) {
-                 $fineList[] = ['amount'     => $row['AMOUNT'],
+                $fineList[] = ['amount'     => $row['AMOUNT'],
                                      'checkout'   => $row['CHECKOUT'],
                                     'fine' => $row['FINE'],
                                      'balance'    => $row['BALANCE'],
diff --git a/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php b/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php
index 2dc303b4cc0..947beb8d37f 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php
@@ -110,11 +110,11 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
             'level' => 'item'
         ];
 
-         $holding = parent::processHoldingRow($id, $row, $patron);
-         $holding += [
+        $holding = parent::processHoldingRow($id, $row, $patron);
+        $holding += [
             'addLink' => $this->checkRequestIsValid($id, $itemData, $patron)
          ];
-         return $holding;
+        return $holding;
     }
 
     /**
@@ -231,7 +231,6 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
             } catch (\Exception $e) {
                 throw new ILSException($e->getMessage());
             }
-
         } elseif (isset($this->wsPickUpLocations)) {
             foreach ($this->wsPickUpLocations as $code => $library) {
                 $pickresponse[] = [
@@ -297,7 +296,6 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
             } catch (\Exception $e) {
                 throw new ILSException($e->getMessage());
             }
-
         } elseif (isset($this->wsDefaultPickUpLocation)) {
             return $this->wsDefaultPickUpLocation;
         }
@@ -628,7 +626,6 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
 
         // No Indication of Success or Failure
         if ($response !== false && !$response->error->message) {
-
             $keys = [];
             // Get a list of bib keys from waiting items
             $currentHolds = $response->holdsdata->waiting->waitingitem;
@@ -774,10 +771,8 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
         $response['ids'] = $renewIDs;
         $i = 0;
         foreach ($origData->itemout as $item) {
-
             $ikey = (string)$item->ikey;
             if (in_array($ikey, $renewIDs)) {
-
                 $response['details'][$ikey]['item_id'] = $ikey;
                 $origRenewals = (string)$item->numrenewals;
                 $currentRenewals = (string)$renewData->itemout[$i]->numrenewals;
@@ -793,13 +788,11 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter
                 }
 
                 if ($currentRenewals > $origRenewals) {
-
                     $response['details'][$ikey] = [
                         'item_id' => $ikey,
                         'new_date' =>  $currentDueDate,
                         'success' => true
                     ];
-
                 } else {
                     $response['details'][$ikey] = [
                     'item_id' => $ikey,
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Koha.php b/module/VuFind/src/VuFind/ILS/Driver/Koha.php
index f9aea5707d4..4370f366fd3 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Koha.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Koha.php
@@ -248,8 +248,7 @@ class Koha extends AbstractBase
                 ];
             }
             return $holding;
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
     }
@@ -315,8 +314,7 @@ class Koha extends AbstractBase
                 ];
             }
             return $fineLst;
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
     }
@@ -356,8 +354,7 @@ class Koha extends AbstractBase
                 ];
             }
             return $holdLst;
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
     }
@@ -398,8 +395,7 @@ class Koha extends AbstractBase
                 return $profile;
             }
             return null;
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
     }
@@ -438,8 +434,7 @@ class Koha extends AbstractBase
                 ];
             }
             return $transactionLst;
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
     }
@@ -480,8 +475,7 @@ class Koha extends AbstractBase
 
                 $blocks[] = implode(' - ', $block);
             }
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
 
@@ -587,8 +581,7 @@ class Koha extends AbstractBase
             } else {
                 return null;
             }
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
 
@@ -637,8 +630,7 @@ class Koha extends AbstractBase
                 return $patron;
             }
             return null;
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
     }
diff --git a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php
index f38055211da..b2721d75bc4 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/KohaILSDI.php
@@ -537,8 +537,8 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
                         $sqlSt->execute();
                         $this->pickupEnableBranchcodes = $sqlSt->fetch();
                     } catch (PDOException $e) {
-                            $this->debug('Connection failed: ' . $e->getMessage());
-                            throw new ILSException($e->getMessage());
+                        $this->debug('Connection failed: ' . $e->getMessage());
+                        throw new ILSException($e->getMessage());
                     }
                 } elseif (!empty($holdDetails['level'])
                     && $holdDetails['level'] == 'title'
@@ -555,8 +555,8 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
                             $this->pickupEnableBranchcodes[] = $row['holdingbranch'];
                         }
                     } catch (PDOException $e) {
-                            $this->debug('Connection failed: ' . $e->getMessage());
-                            throw new ILSException($e->getMessage());
+                        $this->debug('Connection failed: ' . $e->getMessage());
+                        throw new ILSException($e->getMessage());
                     }
                 }
             }
@@ -578,17 +578,17 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
         }
         return $this->locations;
 
-            // we get them from the API
-            // FIXME: Not yet possible: API incomplete.
-            // TODO: When API: pull locations dynamically from API.
-            /* $response = $this->makeRequest("organizations/branch"); */
-            /* $locations_response_array = $response->OrganizationsGetRows; */
-            /* foreach ($locations_response_array as $location_response) { */
-            /*     $locations[] = array( */
-            /*         'locationID'      => $location_response->OrganizationID, */
-            /*         'locationDisplay' => $location_response->Name, */
-            /*     ); */
-            /* } */
+        // we get them from the API
+        // FIXME: Not yet possible: API incomplete.
+        // TODO: When API: pull locations dynamically from API.
+        /* $response = $this->makeRequest("organizations/branch"); */
+        /* $locations_response_array = $response->OrganizationsGetRows; */
+        /* foreach ($locations_response_array as $location_response) { */
+        /*     $locations[] = array( */
+        /*         'locationID'      => $location_response->OrganizationID, */
+        /*         'locationDisplay' => $location_response->Name, */
+        /*     ); */
+        /* } */
     }
 
     /**
@@ -748,7 +748,6 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
      */
     public function getHolding($id, array $patron = null)
     {
-
         $this->debug(
             "Function getHolding($id, "
                . implode(",", (array)$patron)
@@ -938,7 +937,6 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
                 'requests_placed' => $reservesCount ? $reservesCount : 0,
                 'frameworkcode' => $rowItem['DOCTYPE'],
             ];
-
         }
 
         //file_put_contents('holding.txt', print_r($holding,TRUE), FILE_APPEND);
@@ -969,7 +967,6 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
      */
     public function getNewItems($page, $limit, $daysOld, $fundId = null)
     {
-
         $this->debug("getNewItems called $page|$limit|$daysOld|$fundId");
 
         $items = [];
@@ -1055,8 +1052,7 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
             $sqlStmt = $this->db->prepare($sql);
             $sqlStmt->execute([':id' => $id]);
             foreach ($sqlStmt->fetchAll() as $row) {
-                switch ($row['fine'])
-                {
+                switch ($row['fine']) {
                 case 'A':
                     $fineValue = "Account Management Fee";
                     break;
@@ -1134,8 +1130,7 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
                 ];
             }
             return $transactionLst;
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
     }
@@ -1350,8 +1345,7 @@ class KohaILSDI extends \VuFind\ILS\Driver\AbstractBase implements
 
                 $blocks[] = implode(' - ', $block);
             }
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
 
diff --git a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php
index 147c80255b0..36fb4661f19 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php
@@ -467,7 +467,9 @@ class LBS4 extends DAIA implements TranslatorAwareInterface
      */
     protected function prfz($str)
     {
-        $x = 0; $y = 0; $w = 2;
+        $x = 0;
+        $y = 0;
+        $w = 2;
         $stra = str_split($str);
         for ($i = strlen($str); $i > 0; $i--) {
             $c = $stra[$i - 1];
@@ -486,5 +488,4 @@ class LBS4 extends DAIA implements TranslatorAwareInterface
         }
         return $ret;
     }
-
 }
diff --git a/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php b/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php
index f61c4a3dd98..af9bfc4116f 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php
@@ -504,8 +504,7 @@ class NewGenLib extends AbstractBase
         try {
             $sqlStmt = $this->db->prepare($sql);
             $sqlStmt->execute();
-        }
-        catch (PDOException $e) {
+        } catch (PDOException $e) {
             throw new ILSException($e->getMessage());
         }
 
diff --git a/module/VuFind/src/VuFind/ILS/Driver/PAIA.php b/module/VuFind/src/VuFind/ILS/Driver/PAIA.php
index 6751a7aa654..47b050f678d 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/PAIA.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/PAIA.php
@@ -1339,7 +1339,6 @@ class PAIA extends DAIA
             $result['available'] = $doc['status'] == 4 ? true : false;
 
             $results[] = $result;
-
         }
         return $results;
     }
@@ -1359,7 +1358,6 @@ class PAIA extends DAIA
             $result = $this->getBasicDetails($doc);
 
             $results[] = $result;
-
         }
         return $results;
     }
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Polaris.php b/module/VuFind/src/VuFind/ILS/Driver/Polaris.php
index 171dae8bdae..658f92c9767 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Polaris.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Polaris.php
@@ -245,7 +245,6 @@ class Polaris extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
                 'position' => $holds_response->QueuePosition,
                 'title'    => $holds_response->Title,
             ];
-
         }
         return $holds;
     }
@@ -303,7 +302,6 @@ class Polaris extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
                 //'designation' => $designation,
                 'holdable' => $holdings_response->Holdable,
             ];
-
         }
         return $holding;
     }
@@ -431,14 +429,13 @@ class Polaris extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
       
             if ($reply_response->StatusValue == 1) {
                 // auto-reply success
-                  return [ 'success' => true,  'sysMessage' => $response->Message ];
+                return [ 'success' => true,  'sysMessage' => $response->Message ];
             } else {
-                  return [ 'success' => false, 'sysMessage' => $response->Message ];
+                return [ 'success' => false, 'sysMessage' => $response->Message ];
             }
         } else {
             return [ 'success' => false, 'sysMessage' => $response->Message ];
         }
-
     }
 
     /**
@@ -631,7 +628,6 @@ class Polaris extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
         }
 
         return $fineList;
-
     }
     /**
      * Get Patron Profile
@@ -753,7 +749,6 @@ class Polaris extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
                 'sysMessage' => $response->ItemRenewResult->BlockRows[0]->ErrorDesc,
                 ];
             }
-
         }
         $result = [
             'count' => $count, 'details' => $item_response,
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php
index 13cb7a63cdf..92151683da4 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php
@@ -546,9 +546,9 @@ class Symphony extends AbstractBase implements LoggerAwareInterface
             }
 
             $library = $this->translatePolicyID('LIBR', $libraryID);
-            $copyNumber = 0; // ItemInfo does not include copy numbers,
-                             // so we generate them under the assumption
-                             // that items are being listed in order.
+            // ItemInfo does not include copy numbers, so we generate them under
+            // the assumption that items are being listed in order.
+            $copyNumber = 0;
 
             $itemInfos = is_array($callInfo->ItemInfo)
                 ? $callInfo->ItemInfo
@@ -1055,18 +1055,18 @@ class Symphony extends AbstractBase implements LoggerAwareInterface
         return [];
     }
 
-     /**
-      * Patron Login
-      *
-      * This is responsible for authenticating a patron against the catalog.
-      *
-      * @param string $username The patron username
-      * @param string $password The patron password
-      *
-      * @throws ILSException
-      * @return mixed          Associative array of patron info on successful login,
-      * null on unsuccessful login.
-      */
+    /**
+     * Patron Login
+     *
+     * This is responsible for authenticating a patron against the catalog.
+     *
+     * @param string $username The patron username
+     * @param string $password The patron password
+     *
+     * @throws ILSException
+     * @return mixed          Associative array of patron info on successful login,
+     * null on unsuccessful login.
+     */
     public function patronLogin($username, $password)
     {
         $usernameField = $this->config['Behaviors']['usernameField'];
@@ -1130,7 +1130,6 @@ class Symphony extends AbstractBase implements LoggerAwareInterface
                         break;
                     }
                 }
-
             }
         }
 
@@ -1332,7 +1331,7 @@ class Symphony extends AbstractBase implements LoggerAwareInterface
                 ];
             }
             return $holdList;
-        } catch(SoapFault $e) {
+        } catch (SoapFault $e) {
             return null;
         } catch (\Exception $e) {
             throw new ILSException($e->getMessage());
@@ -1411,17 +1410,17 @@ class Symphony extends AbstractBase implements LoggerAwareInterface
         return $holdDetails['reqnum'];
     }
 
-     /**
-      * Cancel Holds
-      *
-      * Attempts to Cancel a hold on a particular item
-      *
-      * @param array $cancelDetails An array of item and patron data
-      *
-      * @return mixed  An array of data on each request including
-      * whether or not it was successful and a system message (if available)
-      * or boolean false on failure
-      */
+    /**
+     * Cancel Holds
+     *
+     * Attempts to Cancel a hold on a particular item
+     *
+     * @param array $cancelDetails An array of item and patron data
+     *
+     * @return mixed  An array of data on each request including
+     * whether or not it was successful and a system message (if available)
+     * or boolean false on failure
+     */
     public function cancelHolds($cancelDetails)
     {
         $count  = 0;
@@ -1459,17 +1458,17 @@ class Symphony extends AbstractBase implements LoggerAwareInterface
         return $result;
     }
 
-     /**
-      * Public Function which retrieves renew, hold and cancel settings from the
-      * driver ini file.
-      *
-      * @param string $function The name of the feature to be checked
-      * @param array  $params   Optional feature-specific parameters (array)
-      *
-      * @return array An array with key-value pairs.
-      *
-      * @SuppressWarnings(PHPMD.UnusedFormalParameter)
-      */
+    /**
+     * Public Function which retrieves renew, hold and cancel settings from the
+     * driver ini file.
+     *
+     * @param string $function The name of the feature to be checked
+     * @param array  $params   Optional feature-specific parameters (array)
+     *
+     * @return array An array with key-value pairs.
+     *
+     * @SuppressWarnings(PHPMD.UnusedFormalParameter)
+     */
     public function getConfig($function, $params = null)
     {
         if (isset($this->config[$function])) {
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php
index f10be792861..b3e9ab0a1e2 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php
@@ -1118,7 +1118,7 @@ class Unicorn extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
             'format' => $format
             ];
 
-            return $item;
+        return $item;
     }
 
     /**
diff --git a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php
index 599fa25fb3d..1b918c8870a 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php
@@ -1057,7 +1057,7 @@ EOT;
                         = $this->pickStatus($availability['otherStatuses']);
                 }
 
-                 // Convert Voyager Format to display format
+                // Convert Voyager Format to display format
                 $dueDate = false;
                 if (!empty($row['DUEDATE'])) {
                     $dueDate = $this->dateFormat->convertToDisplayDate(
@@ -1746,7 +1746,6 @@ EOT;
         $returnList = [];
 
         if (!empty($holdList)) {
-
             $sortHoldList = [];
             // Get a unique List of Bib Ids
             foreach ($holdList as $holdItem) {
diff --git a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php
index 92061e3284f..c77c6681365 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php
@@ -1427,7 +1427,6 @@ EOT;
         $itemId = false
     ) {
         if (!empty($bibId) && !empty($patronId) && !empty($request)) {
-
             $hierarchy = [];
 
             // Build Hierarchy
@@ -1995,7 +1994,7 @@ EOT;
             return $this->holdError('hold_invalid_request_group');
         }
 
-            // Optional check that the bib has items
+        // Optional check that the bib has items
         if ($this->checkItemsExist) {
             $exist = $this->itemsExist(
                 $bibId,
@@ -2080,7 +2079,7 @@ EOT;
         foreach ($details as $cancelDetails) {
             list($itemId, $cancelCode) = explode('|', $cancelDetails);
 
-             // Create Rest API Cancel Key
+            // Create Rest API Cancel Key
             $cancelID = $this->ws_dbKey . '|' . $cancelCode;
 
             // Build Hierarchy
@@ -2112,7 +2111,6 @@ EOT;
                         ? 'hold_cancel_success' : 'hold_cancel_fail',
                     'sysMessage' => ($reply == 'ok') ? false : $reply,
                 ];
-
             } else {
                 $response[$itemId] = [
                     'success' => false, 'status' => 'hold_cancel_fail'
@@ -2577,7 +2575,7 @@ EOT;
         foreach ($details as $cancelDetails) {
             list($dbKey, $itemId, $cancelCode) = explode('|', $cancelDetails);
 
-             // Create Rest API Cancel Key
+            // Create Rest API Cancel Key
             $cancelID = ($dbKey ? $dbKey : $this->ws_dbKey) . '|' . $cancelCode;
 
             // Build Hierarchy
@@ -2609,7 +2607,6 @@ EOT;
                         : 'storage_retrieval_request_cancel_fail',
                     'sysMessage' => ($reply == 'ok') ? false : $reply,
                 ];
-
             } else {
                 $response[$itemId] = [
                     'success' => false,
@@ -3176,7 +3173,7 @@ EOT;
         foreach ($details as $cancelDetails) {
             list($dbKey, $itemId, $type, $cancelCode) = explode('|', $cancelDetails);
 
-             // Create Rest API Cancel Key
+            // Create Rest API Cancel Key
             $cancelID = ($dbKey ? $dbKey : $this->ws_dbKey) . '|' . $cancelCode;
 
             // Build Hierarchy
@@ -3214,7 +3211,6 @@ EOT;
                         ? 'ill_request_cancel_success' : 'ill_request_cancel_fail',
                     'sysMessage' => ($reply == 'ok') ? false : $reply,
                 ];
-
             } else {
                 $response[$itemId] = [
                     'success' => false,
diff --git a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php
index aa466b427d7..8c1e4eb6042 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php
@@ -446,7 +446,6 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
                 $holdings = $current->xpath('ns1:HoldingsSet');
 
                 foreach ($holdings as $current) {
-
                     $holdCallNo = $current->xpath('ns1:CallNumber');
                     $holdCallNo = (string)$holdCallNo[0];
 
@@ -754,7 +753,6 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
         $fines = [];
         $balance = 0;
         foreach ($list as $current) {
-
             $current->registerXPathNamespace('ns1', 'http://www.niso.org/2008/ncip');
 
             $tmp = $current->xpath(
@@ -1496,7 +1494,6 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
                     "new_time" => rtrim($splitTime, "Z"),
                     "item_id" => $renewId,
                 ];
-
             } else {
                 $details[$renewId] = [
                     "success" => false,
@@ -1527,7 +1524,6 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
         $requestId,
         $type
     ) {
-    
         return '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
             '<ns1:NCIPMessage xmlns:ns1="http://www.niso.org/2008/ncip" ' .
             'ns1:version="http://www.niso.org/schemas/ncip/v2_0/imp1/' .
@@ -1688,7 +1684,6 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
         $itemAgencyId,
         $patronAgencyId
     ) {
-    
         return '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>' .
             '<ns1:NCIPMessage xmlns:ns1="http://www.niso.org/2008/ncip" ' .
             'ns1:version="http://www.niso.org/schemas/ncip/v2_0/imp1/' .
diff --git a/module/VuFind/src/VuFind/ILS/Logic/Holds.php b/module/VuFind/src/VuFind/ILS/Logic/Holds.php
index 3c56c8dc7b8..80811b92e1b 100644
--- a/module/VuFind/src/VuFind/ILS/Logic/Holds.php
+++ b/module/VuFind/src/VuFind/ILS/Logic/Holds.php
@@ -341,7 +341,7 @@ class Holds
                             = ($holds_override && isset($copy['holdOverride']))
                             ? $copy['holdOverride'] : $type;
 
-                        switch($currentType) {
+                        switch ($currentType) {
                         case "all":
                             $addlink = true; // always provide link
                             break;
diff --git a/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php b/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php
index a00efec1297..5b973207551 100644
--- a/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php
+++ b/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php
@@ -117,7 +117,7 @@ class TitleHolds
         if ($this->catalog) {
             $mode = $this->catalog->getTitleHoldsMode();
             if ($mode == 'disabled') {
-                 return false;
+                return false;
             } elseif ($mode == 'driver') {
                 try {
                     $patron = $this->ilsAuth->storedCatalogLogin();
@@ -246,9 +246,8 @@ class TitleHolds
 
         if ($checkHolds != false) {
             if ($type == 'always') {
-                 $addlink = true;
+                $addlink = true;
             } elseif ($type == 'availability') {
-
                 $holdings = $this->getHoldings($id);
                 foreach ($holdings as $holding) {
                     if ($holding['availability']
diff --git a/module/VuFind/src/VuFind/Log/LoggerFactory.php b/module/VuFind/src/VuFind/Log/LoggerFactory.php
index 5d690e3f5fa..7e4155f2c88 100644
--- a/module/VuFind/src/VuFind/Log/LoggerFactory.php
+++ b/module/VuFind/src/VuFind/Log/LoggerFactory.php
@@ -271,7 +271,7 @@ class LoggerFactory implements \Zend\ServiceManager\FactoryInterface
 
             // VuFind's configuration provides four priority options, each
             // combining two of the standard Zend levels.
-            switch(trim($priority)) {
+            switch (trim($priority)) {
             case 'debug':
                 // Set static flag indicating that debug is turned on:
                 $logger->debugNeeded(true);
diff --git a/module/VuFind/src/VuFind/OAI/Server.php b/module/VuFind/src/VuFind/OAI/Server.php
index ca469821f9b..722eb0ed8c9 100644
--- a/module/VuFind/src/VuFind/OAI/Server.php
+++ b/module/VuFind/src/VuFind/OAI/Server.php
@@ -223,7 +223,7 @@ class Server
         if (!$this->hasParam('verb')) {
             return $this->showError('badVerb', 'Missing Verb Argument');
         } else {
-            switch($this->params['verb']) {
+            switch ($this->params['verb']) {
             case 'GetRecord':
                 return $this->getRecord();
             case 'Identify':
diff --git a/module/VuFind/src/VuFind/Recommend/MapSelection.php b/module/VuFind/src/VuFind/Recommend/MapSelection.php
index a882f8b1355..9b2474a2e2a 100644
--- a/module/VuFind/src/VuFind/Recommend/MapSelection.php
+++ b/module/VuFind/src/VuFind/Recommend/MapSelection.php
@@ -547,7 +547,6 @@ class MapSelection implements \VuFind\Recommend\RecommendInterface
                             $recId, $ctrLongLat[0], $ctrLongLat[1], $recTitle
                         ];
                     }
-
                 }
             }
         }
diff --git a/module/VuFind/src/VuFind/Record/Cache/RecordCacheAwareTrait.php b/module/VuFind/src/VuFind/Record/Cache/RecordCacheAwareTrait.php
index 57f3150ead4..5330d23eaa1 100644
--- a/module/VuFind/src/VuFind/Record/Cache/RecordCacheAwareTrait.php
+++ b/module/VuFind/src/VuFind/Record/Cache/RecordCacheAwareTrait.php
@@ -66,5 +66,4 @@ trait RecordCacheAwareTrait
     {
         return $this->recordCache;
     }
-
 }
diff --git a/module/VuFind/src/VuFind/RecordDriver/EDS.php b/module/VuFind/src/VuFind/RecordDriver/EDS.php
index 121ffc3c934..abc8699a902 100644
--- a/module/VuFind/src/VuFind/RecordDriver/EDS.php
+++ b/module/VuFind/src/VuFind/RecordDriver/EDS.php
@@ -391,7 +391,6 @@ class EDS extends SolrDefault
                     return $this->toHTML($item['Data']);
                 }
             }
-
         }
         return '';
     }
diff --git a/module/VuFind/src/VuFind/RecordDriver/EIT.php b/module/VuFind/src/VuFind/RecordDriver/EIT.php
index 77806fce8c3..34ab2bf3a2f 100644
--- a/module/VuFind/src/VuFind/RecordDriver/EIT.php
+++ b/module/VuFind/src/VuFind/RecordDriver/EIT.php
@@ -203,7 +203,6 @@ class EIT extends SolrDefault
             return isset($this->controlInfo['artinfo']['aug']['au'])
                 ? [$this->controlInfo['artinfo']['aug']['au']] : [];
         }
-
     }
 
     /**
@@ -397,7 +396,7 @@ class EIT extends SolrDefault
         $pagecount = $this->getContainerPageCount();
         $endpage = $startpage + $pagecount;
         if ($endpage != 0) {
-                return $endpage;
+            return $endpage;
         } else {
             return null;
         }
diff --git a/module/VuFind/src/VuFind/RecordDriver/SolrMarc.php b/module/VuFind/src/VuFind/RecordDriver/SolrMarc.php
index 8d990416c1b..693af73e45e 100644
--- a/module/VuFind/src/VuFind/RecordDriver/SolrMarc.php
+++ b/module/VuFind/src/VuFind/RecordDriver/SolrMarc.php
@@ -857,7 +857,7 @@ class SolrMarc extends SolrDefault
         // If reference found, exit loop and go straight to end
         // If no reference found, check the next link type instead
         foreach ($linkTypes as $linkType) {
-            switch (trim($linkType)){
+            switch (trim($linkType)) {
             case 'oclc':
                 foreach ($linkFields as $current) {
                     if ($oclc = $this->getIdFromLinkingField($current, 'OCoLC')) {
diff --git a/module/VuFind/src/VuFind/RecordTab/Map.php b/module/VuFind/src/VuFind/RecordTab/Map.php
index 2aa03248a19..8d574762f9c 100644
--- a/module/VuFind/src/VuFind/RecordTab/Map.php
+++ b/module/VuFind/src/VuFind/RecordTab/Map.php
@@ -265,7 +265,7 @@ class Map extends AbstractBase
         $mapDisplayCoords = [];
         $mapDisplayLabels = [];
         if ($this->displayCoords) {
-             $mapDisplayCoords = $this->getDisplayCoords();
+            $mapDisplayCoords = $this->getDisplayCoords();
         }
         if (isset($this->mapLabels)) {
             $mapDisplayLabels = $this->getMapLabels();
diff --git a/module/VuFind/src/VuFind/Resolver/Driver/DriverInterface.php b/module/VuFind/src/VuFind/Resolver/Driver/DriverInterface.php
index f0ec93d8310..53ffe8f1faa 100644
--- a/module/VuFind/src/VuFind/Resolver/Driver/DriverInterface.php
+++ b/module/VuFind/src/VuFind/Resolver/Driver/DriverInterface.php
@@ -88,5 +88,4 @@ interface DriverInterface
      * @return bool
      */
     public function supportsMoreOptionsLink();
-
 }
diff --git a/module/VuFind/src/VuFind/Resolver/Driver/Redi.php b/module/VuFind/src/VuFind/Resolver/Driver/Redi.php
index 463c855c2c3..e31e26a2c7c 100644
--- a/module/VuFind/src/VuFind/Resolver/Driver/Redi.php
+++ b/module/VuFind/src/VuFind/Resolver/Driver/Redi.php
@@ -199,7 +199,6 @@ class Redi extends AbstractBase
 
         if ($ezbResultsNodesText->length == $ezbResultsNodesURL->length) {
             for ($i = 0; $i < $ezbResultsNodesText->length; $i++) {
-
                 $accessClass = 'unknown';
                 $accessClassExpressions = [
                     "denied"    => "//div[@class='t_ezb_result']["
diff --git a/module/VuFind/src/VuFind/Search/EDS/Options.php b/module/VuFind/src/VuFind/Search/EDS/Options.php
index 20c1ffb9e1c..e2ed9d87841 100644
--- a/module/VuFind/src/VuFind/Search/EDS/Options.php
+++ b/module/VuFind/src/VuFind/Search/EDS/Options.php
@@ -502,9 +502,7 @@ class Options extends \VuFind\Search\Base\Options
                         'DefaultOn' => isset($limiter['DefaultOn'])
                             ? $limiter['DefaultOn'] : 'n',
                     ];
-
                 }
-
             }
         }
     }
diff --git a/module/VuFind/src/VuFind/Search/EDS/Params.php b/module/VuFind/src/VuFind/Search/EDS/Params.php
index ddc655630aa..794dcfeec36 100644
--- a/module/VuFind/src/VuFind/Search/EDS/Params.php
+++ b/module/VuFind/src/VuFind/Search/EDS/Params.php
@@ -334,7 +334,6 @@ class Params extends \VuFind\Search\Base\Params
                     $ssLimiter['selectedvalue'], $ssLimiter['description']
                 );
             }
-
         }
     }
 
@@ -354,7 +353,6 @@ class Params extends \VuFind\Search\Base\Params
                     $expander['selectedvalue'], $expander['description']
                 );
             }
-
         }
     }
 
diff --git a/module/VuFind/src/VuFind/Search/EDS/QueryAdapter.php b/module/VuFind/src/VuFind/Search/EDS/QueryAdapter.php
index 4c2548321ef..5879ef03392 100644
--- a/module/VuFind/src/VuFind/Search/EDS/QueryAdapter.php
+++ b/module/VuFind/src/VuFind/Search/EDS/QueryAdapter.php
@@ -76,7 +76,7 @@ class QueryAdapter extends \VuFind\Search\QueryAdapter
     protected static function displayAdvanced(AbstractQuery $query, $translate,
         $showName
     ) {
-            $output = '';
+        $output = '';
         //There should only ever be 1 group with EDS queries.
         $all = [];
         foreach ($query->getQueries() as $search) {
diff --git a/module/VuFind/src/VuFind/Search/Minified.php b/module/VuFind/src/VuFind/Search/Minified.php
index 2854a61b185..84263b3faa8 100644
--- a/module/VuFind/src/VuFind/Search/Minified.php
+++ b/module/VuFind/src/VuFind/Search/Minified.php
@@ -138,7 +138,7 @@ class Minified
         // search class ID for the object we're about to construct:
         if (!isset($this->cl)) {
             $fixType = true;    // by default, assume we need to fix type
-            switch($this->ty) {
+            switch ($this->ty) {
             case 'Summon':
             case 'SummonAdvanced':
                 $this->cl = 'Summon';
diff --git a/module/VuFind/src/VuFind/Search/Primo/InjectOnCampusListener.php b/module/VuFind/src/VuFind/Search/Primo/InjectOnCampusListener.php
index e75640b1ac2..7a78e57da49 100644
--- a/module/VuFind/src/VuFind/Search/Primo/InjectOnCampusListener.php
+++ b/module/VuFind/src/VuFind/Search/Primo/InjectOnCampusListener.php
@@ -126,5 +126,4 @@ class InjectOnCampusListener
 
         return $event;
     }
-
 }
diff --git a/module/VuFind/src/VuFind/Search/Primo/PrimoPermissionHandler.php b/module/VuFind/src/VuFind/Search/Primo/PrimoPermissionHandler.php
index 8ef3535f2b4..d0f43ec69ce 100644
--- a/module/VuFind/src/VuFind/Search/Primo/PrimoPermissionHandler.php
+++ b/module/VuFind/src/VuFind/Search/Primo/PrimoPermissionHandler.php
@@ -242,7 +242,6 @@ class PrimoPermissionHandler
         if ($this->instCode === null) {
             $this->instCode = false;
         }
-
     }
 
     /**
diff --git a/module/VuFind/src/VuFind/Search/Solr/DeduplicationListener.php b/module/VuFind/src/VuFind/Search/Solr/DeduplicationListener.php
index e0512d76f38..ea866a8800b 100644
--- a/module/VuFind/src/VuFind/Search/Solr/DeduplicationListener.php
+++ b/module/VuFind/src/VuFind/Search/Solr/DeduplicationListener.php
@@ -362,5 +362,4 @@ class DeduplicationListener
         array_unshift($result, '');
         return array_flip($result);
     }
-
 }
diff --git a/module/VuFind/src/VuFind/Search/Solr/InjectConditionalFilterListener.php b/module/VuFind/src/VuFind/Search/Solr/InjectConditionalFilterListener.php
index 15ea7983688..e88cb0dadd0 100644
--- a/module/VuFind/src/VuFind/Search/Solr/InjectConditionalFilterListener.php
+++ b/module/VuFind/src/VuFind/Search/Solr/InjectConditionalFilterListener.php
@@ -143,5 +143,4 @@ class InjectConditionalFilterListener
 
         return $event;
     }
-
 }
diff --git a/module/VuFind/src/VuFind/Search/Solr/V4/ErrorListener.php b/module/VuFind/src/VuFind/Search/Solr/V4/ErrorListener.php
index 02845f34d9d..6f4ce837e6b 100644
--- a/module/VuFind/src/VuFind/Search/Solr/V4/ErrorListener.php
+++ b/module/VuFind/src/VuFind/Search/Solr/V4/ErrorListener.php
@@ -129,5 +129,4 @@ class ErrorListener extends AbstractErrorListener
         }
         return self::TYPE_OTHER;
     }
-
 }
diff --git a/module/VuFind/src/VuFind/Service/Factory.php b/module/VuFind/src/VuFind/Service/Factory.php
index a485aff08b0..1780a0dbf7f 100644
--- a/module/VuFind/src/VuFind/Service/Factory.php
+++ b/module/VuFind/src/VuFind/Service/Factory.php
@@ -614,13 +614,13 @@ class Factory
      */
     public static function getPermissionManager(ServiceManager $sm)
     {
-            $permManager = new \VuFind\Role\PermissionManager(
-                $sm->get('VuFind\Config')->get('permissions')->toArray()
-            );
-            $permManager->setAuthorizationService(
-                $sm->get('ZfcRbac\Service\AuthorizationService')
-            );
-            return $permManager;
+        $permManager = new \VuFind\Role\PermissionManager(
+            $sm->get('VuFind\Config')->get('permissions')->toArray()
+        );
+        $permManager->setAuthorizationService(
+            $sm->get('ZfcRbac\Service\AuthorizationService')
+        );
+        return $permManager;
     }
 
     /**
diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Browse.php b/module/VuFind/src/VuFind/View/Helper/Root/Browse.php
index fdb71a3fb7c..207c2a70080 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/Browse.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/Browse.php
@@ -52,7 +52,7 @@ class Browse extends AbstractHelper
     {
         $action = strToLower($action);
         $backup = strToLower($backup);
-        switch($action) {
+        switch ($action) {
         case 'dewey':
             return 'dewey-hundreds';
         case 'lcc':
diff --git a/module/VuFind/src/VuFind/View/Helper/Root/JqueryValidation.php b/module/VuFind/src/VuFind/View/Helper/Root/JqueryValidation.php
index 6e24781a3cd..16d335e9962 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/JqueryValidation.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/JqueryValidation.php
@@ -59,7 +59,7 @@ class JqueryValidation extends AbstractHelper
         $rules = [];
         foreach ($supported_rules as $rule) {
             if (isset($params[$rule])) {
-                switch($rule) {
+                switch ($rule) {
                 case 'equalTo':
                     $rules[] = "equalTo:'" . $params['equalToField'] . "'";
                     $messages[$rule] = $params[$rule];
diff --git a/module/VuFind/src/VuFind/View/Helper/Root/Record.php b/module/VuFind/src/VuFind/View/Helper/Root/Record.php
index 89aea5f9a96..a0d767251f4 100644
--- a/module/VuFind/src/VuFind/View/Helper/Root/Record.php
+++ b/module/VuFind/src/VuFind/View/Helper/Root/Record.php
@@ -561,7 +561,7 @@ class Record extends AbstractHelper
             return false;
         }
 
-        switch($context) {
+        switch ($context) {
         case "core" :
         case "results" :
             $key = 'showIn' . ucwords(strtolower($context));
diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php
index 9973aadbfe6..bbc121737ad 100644
--- a/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php
+++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Auth/ShibbolethTest.php
@@ -228,6 +228,6 @@ class ShibbolethTest extends \VuFindTest\Unit\DbTestCase
      */
     public static function tearDownAfterClass()
     {
-         static::removeUsers('testuser');
-   }
+        static::removeUsers('testuser');
+    }
 }
diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CartTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CartTest.php
index 881dceb37f1..689472beed0 100644
--- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CartTest.php
+++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/CartTest.php
@@ -148,8 +148,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
      */
     protected function addCurrentPageToCart(Element $page, Element $updateCart,
         $selectAllId = '#addFormCheckboxSelectAll'
-    )
-    {
+    ) {
         $selectAll = $page->find('css', $selectAllId);
         $selectAll->check();
         $updateCart->click();
@@ -194,7 +193,8 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
      *
      * @return Element
      */
-    protected function setUpGenericCartTest($extraConfigs = []) {
+    protected function setUpGenericCartTest($extraConfigs = [])
+    {
         // Activate the cart:
         $extraConfigs['config']['Site'] = ['showBookBag' => true];
         $this->changeConfigs($extraConfigs);
@@ -306,7 +306,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
      */
     public function testAddingDuplicates()
     {
-         // Activate the cart:
+        // Activate the cart:
         $this->changeConfigs(
             [
                 'config' => [
@@ -326,7 +326,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
         $this->assertEquals('2', $this->findCss($page, '#cartItems strong')->getText());
         $this->tryAddingDuplicatesToCart($page, $updateCart);
         $this->assertEquals('2', $this->findCss($page, '#cartItems strong')->getText());
-   }
+    }
 
     /**
      * Test that the cart limit is enforced from search results.
@@ -335,7 +335,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
      */
     public function testOverfillingCart()
     {
-         // Activate the cart:
+        // Activate the cart:
         $this->changeConfigs(
             [
                 'config' => [
@@ -354,7 +354,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
         $updateCart = $this->findCss($page, '#updateCart');
         $this->addCurrentPageToCart($page, $updateCart);
         $this->assertEquals('1', $this->findCss($page, '#cartItems strong')->getText());
-   }
+    }
 
     /**
      * Test that the cart limit is enforced from record pages.
@@ -363,7 +363,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
      */
     public function testOverfillingCartFromRecordPage()
     {
-         // Activate the cart:
+        // Activate the cart:
         $this->changeConfigs(
             ['config' => ['Site' => ['showBookBag' => true, 'bookBagMaxSize' => 1]]]
         );
@@ -388,7 +388,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
         $add = $this->findCss($page, '.cart-add');
         $add->click();
         $this->assertEquals('1 items (Full)', $cartItems->getText());
-   }
+    }
 
     /**
      * Test that the record "add to cart" button functions.
@@ -397,7 +397,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
      */
     public function testAddingMultipleRecordsFromRecordPage()
     {
-         // Activate the cart:
+        // Activate the cart:
         $this->changeConfigs(
             ['config' => ['Site' => ['showBookBag' => true]]]
         );
@@ -410,7 +410,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
                 $x . ' items', $this->findCss($page, '#cartItems')->getText()
             );
         }
-   }
+    }
 
     /**
      * Test that we can put items in the cart and then remove them with the
@@ -479,7 +479,7 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
      */
     public function testFillCartUsingBottomControls()
     {
-         // Activate the cart:
+        // Activate the cart:
         $this->changeConfigs(
             [
                 'config' => [
@@ -747,7 +747,8 @@ class CartTest extends \VuFindTest\Unit\MinkTestCase
         return $elements;
     }
 
-    public function testToolbarVisibilityConfigCombinations() {
+    public function testToolbarVisibilityConfigCombinations()
+    {
         $page = $this->getSearchResultsPage();
         $elements = $this->runConfigCombo($page, [
             'showBookBag' => true,
diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordTest.php
index 557b2d36048..eaf7aebef38 100644
--- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordTest.php
+++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/RecordTest.php
@@ -146,6 +146,5 @@ class RecordTest extends \VuFindTest\Unit\MinkTestCase
         );
         $this->tryRecordTabsOnId('testsample1');
         $this->tryLoadingTabHashAndReturningToDefault('testsample2');
-
     }
 }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php
index 5b509546d30..715a0ecb419 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/ResultScrollerTest.php
@@ -357,7 +357,8 @@ class ResultScrollerTest extends TestCase
      *
      * @return ResultScroller
      */
-    protected function getMockResultScroller($results) {
+    protected function getMockResultScroller($results)
+    {
         $mockManager = $this->getMockBuilder('VuFind\Search\Results\PluginManager')
             ->disableOriginalConstructor()->getMock();
         return new ResultScrollerMock($mockManager, $results);
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/DemoTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/DemoTest.php
index 6eaa103761b..c1c875dd8b7 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/DemoTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/DemoTest.php
@@ -58,7 +58,9 @@ class DemoTest extends \VuFindTest\Unit\TestCase
             ->disableOriginalConstructor()->getMock();
         $this->driver = new Demo(
             new \VuFind\Date\Converter(), $this->createMock('VuFindSearch\Service'),
-            function () use ($session) { return $session; }
+            function () use ($session) {
+                return $session;
+            }
         );
         $this->driver->init();
     }
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 6809d371b38..44a8efa80a7 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
@@ -622,7 +622,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
     public function testDefaultDriver()
     {
         //Case: The parameters let it know what driver to use
-            //Result: return the function results for that driver
+        //Result: return the function results for that driver
         $patron = $this->getPatron('username', 'institution');
 
         $ILS = $this->getMockILS('Voyager', ['getMyTransactions', 'init']);
@@ -647,7 +647,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
         $this->assertTrue($returnVal);
 
         //Case: There is a default driver set in the configuration
-            //Result: return the function results for that driver
+        //Result: return the function results for that driver
 
         // We need to clear patron login information so that MultiBackend has to
         // fall back on the defaultDriver implementation
@@ -2143,7 +2143,6 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
         $this->setProperty($driver, 'ilsAuth', $mockAuth);
         $result = $driver->getConfig('Holds');
         $this->assertEquals($expected1, $result);
-
     }
 
     /**
@@ -2171,40 +2170,40 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
         $this->setProperty($driver, 'drivers', $drivers);
 
         //Case: No driver info in params, but default driver has method
-            //Result: A return of false
+        //Result: A return of false
 
         $this->setProperty($driver, 'defaultDriver', 'testing3');
         $methodReturn = $driver->supportsMethod('fail', null);
         $this->assertFalse($methodReturn);
 
         //Case: No driver info in params, though default driver has method
-            //Result: A return of true
+        //Result: A return of true
 
         $methodReturn = $driver->supportsMethod('getStatus', null);
         $this->assertTrue($methodReturn);
         $this->setProperty($driver, 'defaultDriver', null);
 
         //Case: Instance to use is in parameters but does not have method
-            //Result: A return of false
+        //Result: A return of false
 
         $patron = [$this->getPatron('username', 'testing3')];
         $methodReturn = $driver->supportsMethod('fail', $patron);
         $this->assertFalse($methodReturn);
 
         //Case: Instance to use is in parameters and has method
-            //Result: A return of true
+        //Result: A return of true
 
         $methodReturn = $driver->supportsMethod('getStatus', $patron);
         $this->assertTrue($methodReturn);
 
         //Case: No parameters are given
-            //Result: A return of true
+        //Result: A return of true
 
         $methodReturn = $driver->supportsMethod('getStatus', null);
         $this->assertTrue($methodReturn);
 
         //Case: getLoginDrivers and getDefaultLoginDriver are always supported
-            //Result: A return of true
+        //Result: A return of true
 
         $methodReturn = $driver->supportsMethod('getLoginDrivers', null);
         $this->assertTrue($methodReturn);
@@ -2398,7 +2397,9 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
                 [
                     new \VuFind\Date\Converter(),
                     $this->createMock('VuFindSearch\Service'),
-                    function () use ($session) { return $session; }
+                    function () use ($session) {
+                        return $session;
+                    }
                 ]
             )->getMock();
     }
@@ -2423,7 +2424,7 @@ class MultiBackendTest extends \VuFindTest\Unit\TestCase
                     ->setConstructorArgs([new \VuFind\Date\Converter()])
                     ->getMock();
             }
-        } catch(\Exception $e) {
+        } catch (\Exception $e) {
             $mock = $this->getMockBuilder(__NAMESPACE__ . '\\' . $type . 'Mock')
                 ->setMethods($methods)->getMock();
         }
@@ -2617,7 +2618,8 @@ class VoyagerMock extends \VuFind\ILS\Driver\Voyager
 class VoyagerNoSupportMock extends \VuFind\ILS\Driver\Voyager
 {
     use ILSMockTrait;
-    public function supportsMethod(...$args) {
+    public function supportsMethod(...$args)
+    {
         return false;
     }
 }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PAIATest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PAIATest.php
index fb0e5055b49..307790b2108 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PAIATest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/ILS/Driver/PAIATest.php
@@ -539,14 +539,14 @@ class PAIATest extends \VuFindTest\Unit\ILSDriverTestCase
 
         $this->assertEquals($this->renewTestResult, $result);
 
-    /* TODO: make me work
-        $conn_fail = $this->createConnector('renew_error.json');
-        $connfail->setConfig($this->validConfig);
-        $conn_fail->init();
-        $result_fail = $conn_fail->renewMyItems($renew_request);
-
-        $this->assertEquals($this->failedRenewTestResult, $result_fail);
-    */
+        /* TODO: make me work
+            $conn_fail = $this->createConnector('renew_error.json');
+            $connfail->setConfig($this->validConfig);
+            $conn_fail->init();
+            $result_fail = $conn_fail->renewMyItems($renew_request);
+
+            $this->assertEquals($this->failedRenewTestResult, $result_fail);
+        */
     }
 
     /**
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php
index 54fa4b610a1..f2db494217d 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Mailer/MailerTest.php
@@ -292,6 +292,7 @@ class MailerTest extends \VuFindTest\Unit\TestCase
 
 class MockEmailRenderer extends \Zend\View\Renderer\PhpRenderer
 {
-    public function partial($template, $driver) {
+    public function partial($template, $driver)
+    {
     }
 }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/UserTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/UserTest.php
index 43aa098d933..8c10716b89c 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/UserTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Role/PermissionProvider/UserTest.php
@@ -152,5 +152,4 @@ class UserTest extends \VuFindTest\Unit\TestCase
 
         return $user;
     }
-
 }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/PrimoPermissionHandlerTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/PrimoPermissionHandlerTest.php
index 29d7093d724..c54dd455cc8 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/PrimoPermissionHandlerTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Primo/PrimoPermissionHandlerTest.php
@@ -809,7 +809,8 @@ class PrimoPermissionHandlerTest extends TestCase
      *
      * @return void
      */
-    public function handlerMemberAuthNotSuccessfullCallback($param) {
+    public function handlerMemberAuthNotSuccessfullCallback($param)
+    {
         if ($param == 'primo.MEMBER') {
             return false;
         }
@@ -822,7 +823,8 @@ class PrimoPermissionHandlerTest extends TestCase
      *
      * @return void
      */
-    public function handlerMemberAuthSuccessfullCallback($param) {
+    public function handlerMemberAuthSuccessfullCallback($param)
+    {
         if ($param == 'primo.MEMBER') {
             return true;
         }
@@ -835,7 +837,8 @@ class PrimoPermissionHandlerTest extends TestCase
      *
      * @return void
      */
-    public function handlerDefaultAuthSuccessfullCallback($param) {
+    public function handlerDefaultAuthSuccessfullCallback($param)
+    {
         if ($param == 'primo.defaultRule') {
             return true;
         }
@@ -848,7 +851,8 @@ class PrimoPermissionHandlerTest extends TestCase
      *
      * @return void
      */
-    public function handlerDefaultAuthNotSuccessfullCallback($param) {
+    public function handlerDefaultAuthNotSuccessfullCallback($param)
+    {
         if ($param == 'primo.defaultRule') {
             return false;
         }
@@ -861,7 +865,8 @@ class PrimoPermissionHandlerTest extends TestCase
      *
      * @return void
      */
-    public function handlerMemberIsOnCampusCallback($param) {
+    public function handlerMemberIsOnCampusCallback($param)
+    {
         if ($param == 'primo.defaultRule') {
             return false;
         }
@@ -880,7 +885,8 @@ class PrimoPermissionHandlerTest extends TestCase
      *
      * @return void
      */
-    public function handlerMemberIsNotOnCampusCallback($param) {
+    public function handlerMemberIsNotOnCampusCallback($param)
+    {
         if ($param == 'primo.defaultRule') {
             return false;
         }
@@ -899,7 +905,8 @@ class PrimoPermissionHandlerTest extends TestCase
      *
      * @return void
      */
-    public function handlerIsNotAMemberCallback($param) {
+    public function handlerIsNotAMemberCallback($param)
+    {
         if ($param == 'primo.defaultRule') {
             return false;
         }
@@ -915,7 +922,8 @@ class PrimoPermissionHandlerTest extends TestCase
      *
      * @return void
      */
-    public function handlerIsOnDefaultCampusCallback($param) {
+    public function handlerIsOnDefaultCampusCallback($param)
+    {
         if ($param == 'primo.defaultRule') {
             return true;
         }
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/HierarchicalFacetHelperTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/HierarchicalFacetHelperTest.php
index 741d0226bcf..3bf7c564c0d 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/HierarchicalFacetHelperTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/Solr/HierarchicalFacetHelperTest.php
@@ -179,7 +179,6 @@ class HierarchicalFacetHelperTest extends TestCase
             $facetList[0]['children'][0]['value'], '1/Book/BookPart/'
         );
         $this->assertEquals($facetList[0]['children'][0]['isApplied'], true);
-
     }
 
     /**
diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/PermissionTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/PermissionTest.php
index c655b0367d5..74ba1a75f4d 100644
--- a/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/PermissionTest.php
+++ b/module/VuFind/tests/unit-tests/src/VuFindTest/View/Helper/Root/PermissionTest.php
@@ -150,7 +150,8 @@ class PermissionTest  extends \VuFindTest\Unit\ViewHelperTestCase
      *
      * @return \VuFind\Role\PermissionDeniedManager
      */
-    protected function getMockPmd($config = false) {
+    protected function getMockPmd($config = false)
+    {
         $mockPmd = $this->getMockBuilder('\VuFind\Role\PermissionDeniedManager')
             ->setConstructorArgs([$this->permissionDeniedConfig])
             ->getMock();
@@ -166,7 +167,8 @@ class PermissionTest  extends \VuFindTest\Unit\ViewHelperTestCase
      *
      * @return \VuFind\Role\PermissionManager
      */
-    protected function getMockPm($isAuthorized = false) {
+    protected function getMockPm($isAuthorized = false)
+    {
         $mockPm = $this->getMockBuilder('\VuFind\Role\PermissionManager')
             ->disableOriginalConstructor()
             ->getMock();
diff --git a/module/VuFindAdmin/src/VuFindAdmin/Controller/ConfigController.php b/module/VuFindAdmin/src/VuFindAdmin/Controller/ConfigController.php
index b585e5f5ec1..1f389952a14 100644
--- a/module/VuFindAdmin/src/VuFindAdmin/Controller/ConfigController.php
+++ b/module/VuFindAdmin/src/VuFindAdmin/Controller/ConfigController.php
@@ -79,5 +79,4 @@ class ConfigController extends AbstractAdmin
         }
         return $this->forwardTo('AdminConfig', 'Home');
     }
-
 }
diff --git a/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php b/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php
index b5e26167315..447b0cef037 100644
--- a/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php
+++ b/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php
@@ -170,7 +170,6 @@ class TagsController extends AbstractAdmin
                 return $this->confirmTagsDelete($ids, $originUrl, $newUrl);
             }
             $delete = $tags->deleteByIdArray($ids);
-
         }
 
         if (0 == $delete) {
diff --git a/module/VuFindDevTools/src/VuFindDevTools/LanguageHelper.php b/module/VuFindDevTools/src/VuFindDevTools/LanguageHelper.php
index 19787bd032c..a66863015a1 100644
--- a/module/VuFindDevTools/src/VuFindDevTools/LanguageHelper.php
+++ b/module/VuFindDevTools/src/VuFindDevTools/LanguageHelper.php
@@ -160,7 +160,7 @@ class LanguageHelper
         if (isset($this->config->Languages->$lang)) {
             return $this->config->Languages->$lang;
         }
-        switch($lang) {
+        switch ($lang) {
         case 'en-gb':
             return 'British English';
         case 'pt-br':
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php b/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php
index 64d0df1e74f..a106c83f5c9 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/BackendInterface.php
@@ -81,5 +81,4 @@ interface BackendInterface
      * @return \VuFindSearch\Response\RecordCollectionInterface
      */
     public function retrieve($id, ParamBag $params = null);
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php
index 468454d6ad9..c33dd0337dd 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/BrowZine/Response/RecordCollectionFactory.php
@@ -90,7 +90,6 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
      */
     public function factory($response)
     {
-
         if (!is_array($response)) {
             throw new InvalidArgumentException(
                 sprintf(
@@ -105,5 +104,4 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
         }
         return $collection;
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php
index 341858881ac..99f10b65e1d 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Backend.php
@@ -183,16 +183,16 @@ class Backend extends AbstractBackend
         $this->defaultProfile = $this->profile;
     }
 
-     /**
-      * Perform a search and return record collection.
-      *
-      * @param AbstractQuery $query  Search query
-      * @param int           $offset Search offset
-      * @param int           $limit  Search limit
-      * @param ParamBag      $params Search backend parameters
-      *
-      * @return \VuFindSearch\Response\RecordCollectionInterface
-      **/
+    /**
+     * Perform a search and return record collection.
+     *
+     * @param AbstractQuery $query  Search query
+     * @param int           $offset Search offset
+     * @param int           $limit  Search limit
+     * @param ParamBag      $params Search backend parameters
+     *
+     * @return \VuFindSearch\Response\RecordCollectionInterface
+     **/
     public function search(AbstractQuery $query, $offset, $limit,
         ParamBag $params = null
     ) {
@@ -247,7 +247,7 @@ class Backend extends AbstractBackend
                     }
                     $response = $this->client
                         ->search($searchModel, $authenticationToken, $sessionToken);
-                } catch(Exception $e) {
+                } catch (Exception $e) {
                     throw new BackendException($e->getMessage(), $e->getCode(), $e);
                 }
                 break;
@@ -255,7 +255,7 @@ class Backend extends AbstractBackend
                 $response = [];
                 break;
             }
-        } catch(Exception $e) {
+        } catch (Exception $e) {
             $this->debugPrint("Exception found: " . $e->getMessage());
             throw new BackendException($e->getMessage(), $e->getCode(), $e);
         }
@@ -310,7 +310,7 @@ class Backend extends AbstractBackend
                     $response = $this->client->retrieve(
                         $an, $dbId, $authenticationToken, $sessionToken, $hlTerms
                     );
-                } catch(Exception $e) {
+                } catch (Exception $e) {
                     throw new BackendException($e->getMessage(), $e->getCode(), $e);
                 }
                 break;
@@ -537,7 +537,7 @@ class Backend extends AbstractBackend
         try {
             $authToken = $this->getAuthenticationToken();
             $results = $this->client->createSession($profile, $isGuest, $authToken);
-        } catch(\EbscoEdsApiException $e) {
+        } catch (\EbscoEdsApiException $e) {
             $errorCode = $e->getApiErrorCode();
             $desc = $e->getApiErrorDescription();
             $this->debugPrint(
@@ -549,7 +549,7 @@ class Backend extends AbstractBackend
                     $authToken = $this->getAuthenticationToken(true);
                     $results = $this->client
                         ->createSession($this->profile, $isGuest, $authToken);
-                } catch(Exception $e) {
+                } catch (Exception $e) {
                     throw new BackendException(
                         $e->getMessage(),
                         $e->getCode(),
@@ -585,20 +585,18 @@ class Backend extends AbstractBackend
                     $authenticationToken = $this->getAuthenticationToken(true);
                     $response = $this->client
                         ->info($authenticationToken, $sessionToken);
-                } catch(Exception $e) {
+                } catch (Exception $e) {
                     throw new BackendException(
                         $e->getMessage(),
                         $e->getCode(),
                         $e
                     );
-
                 }
             } else {
                 $response = [];
             }
         }
         return $response;
-
     }
 
     /**
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php
index d4d10ad132f..cae4b07e2ca 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php
@@ -99,7 +99,7 @@ abstract class EdsApi_REST_Base
     {
         if (is_array($settings)) {
             foreach ($settings as $key => $value) {
-                switch($key) {
+                switch ($key) {
                 case 'debug':
                     $this->debug = $value;
                     break;
@@ -190,7 +190,6 @@ abstract class EdsApi_REST_Base
         $url = $this->edsApiHost . '/retrieve';
         $headers = $this->setTokens($authenticationToken, $sessionToken);
         return $this->call($url, $headers, $qs);
-
     }
 
     /**
@@ -332,7 +331,7 @@ abstract class EdsApi_REST_Base
         //process response.
         try {
             $result = json_decode($input, true);
-        } catch(Exception $e) {
+        } catch (Exception $e) {
             throw new EbscoEdsApiException(
                 'An error occurred when processing EDS Api response: '
                 . $e->getMessage()
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Exception.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Exception.php
index 0a1245b013e..8e10623e766 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Exception.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Exception.php
@@ -60,7 +60,6 @@ class EbscoEdsApiException extends \VuFindSearch\Backend\Exception\BackendExcept
         } else {
             parent::__construct($apiErrorMessage);
         }
-
     }
 
     /**
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/QueryBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/QueryBuilder.php
index fb2611633e5..3c90dbf4217 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/QueryBuilder.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/QueryBuilder.php
@@ -138,6 +138,5 @@ class QueryBuilder
             }
         }
         return $groups;
-
     }
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollection.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollection.php
index d11d3843491..138e2a1d621 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollection.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollection.php
@@ -112,7 +112,6 @@ class RecordCollection extends AbstractRecordCollection
                     'count' => $availableFacetValue['Count'],
                     'displayText' => $availableFacetValue['Value']
                 ];
-
             }
             $vufindFacet['counts'] = $values;
             $vufindFacetList[$facet['Id']] = $vufindFacet;
@@ -141,5 +140,4 @@ class RecordCollection extends AbstractRecordCollection
         }
         return 0;
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php
index 40e089a7248..2d95860059e 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Response/RecordCollectionFactory.php
@@ -109,5 +109,4 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
         }
         return $collection;
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/SearchRequestModel.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/SearchRequestModel.php
index 411b92c9d4e..f7f99a04883 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/SearchRequestModel.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/SearchRequestModel.php
@@ -172,7 +172,7 @@ class SearchRequestModel
     public function setParameters($parameters = [])
     {
         foreach ($parameters as $key => $values) {
-            switch($key) {
+            switch ($key) {
             case 'filters':
                 $cnt = 1;
                 foreach ($values as $filter) {
@@ -381,13 +381,13 @@ class SearchRequestModel
         return addcslashes($value, ":,");
     }
     
-     /**
-      * Escape characters that may be present in the action parameter syntax
-      *
-      * @param string $value The value to escape
-      *
-      * @return string       The value with special characters escaped
-      */
+    /**
+     * Escape characters that may be present in the action parameter syntax
+     *
+     * @param string $value The value to escape
+     *
+     * @return string       The value with special characters escaped
+     */
     public static function escapeSpecialCharactersForActions($value)
     {
         return addcslashes($value, ":,()");
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Zend2.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Zend2.php
index 6c4ada32061..4080e8928cc 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Zend2.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Zend2.php
@@ -45,11 +45,11 @@ class Zend2 extends EdsApi_REST_Base implements LoggerAwareInterface
 {
     use \VuFind\Log\LoggerAwareTrait;
 
-     /**
-      * The HTTP Request object to execute EDS API transactions
-      *
-      * @var Zend2HttpClient
-      */
+    /**
+     * The HTTP Request object to execute EDS API transactions
+     *
+     * @var Zend2HttpClient
+     */
     protected $client;
 
     /**
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollection.php b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollection.php
index 27b7dd4a83d..5acbbc0b8c6 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollection.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Response/XML/RecordCollection.php
@@ -90,7 +90,6 @@ class RecordCollection extends AbstractRecordCollection
      */
     public function getOffset()
     {
-    
         return isset($this->response['offset']) ? $this->response['offset'] : 0;
     }
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Response/RecordCollectionFactory.php
index dcc1bcd316e..789f12b039e 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/Response/RecordCollectionFactory.php
@@ -90,7 +90,6 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
      */
     public function factory($response)
     {
-
         if (!is_array($response)) {
             throw new InvalidArgumentException(
                 sprintf(
@@ -105,5 +104,4 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
         }
         return $collection;
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php
index 65b8abefbad..8e9ab051253 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Pazpar2/Response/RecordCollectionFactory.php
@@ -97,5 +97,4 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
         }
         return $collection;
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Connector.php
index ed1fb2e6f3b..f918c53ad8a 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Connector.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Connector.php
@@ -326,7 +326,6 @@ class Connector implements \Zend\Log\LoggerAwareInterface
 
             if ($this->debug) {
                 print "URL: " . implode('&', $qs);
-
             }
 
             // Send Request
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Response/RecordCollectionFactory.php
index 74f67f9050d..fc0af56695a 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Primo/Response/RecordCollectionFactory.php
@@ -90,7 +90,6 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
      */
     public function factory($response)
     {
-
         if (!is_array($response)) {
             throw new InvalidArgumentException(
                 sprintf(
@@ -105,5 +104,4 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
         }
         return $collection;
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/CommitDocument.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/CommitDocument.php
index 27b7f1e3590..dd024be40a2 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/CommitDocument.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/CommitDocument.php
@@ -88,5 +88,4 @@ class CommitDocument extends AbstractDocument
         $writer->endDocument();
         return $writer->flush();
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/OptimizeDocument.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/OptimizeDocument.php
index 523ad174bad..cc5823077a6 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/OptimizeDocument.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/OptimizeDocument.php
@@ -104,5 +104,4 @@ class OptimizeDocument extends AbstractDocument
         $writer->endDocument();
         return $writer->flush();
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/UpdateDocument.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/UpdateDocument.php
index 65927e78979..3e98ae0316c 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/UpdateDocument.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Document/UpdateDocument.php
@@ -116,5 +116,4 @@ class UpdateDocument extends AbstractDocument
     ) {
         $this->records->attach($record, $indexAttr);
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/LuceneSyntaxHelper.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/LuceneSyntaxHelper.php
index fc844b2936e..c6a5bd050da 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/LuceneSyntaxHelper.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/LuceneSyntaxHelper.php
@@ -538,7 +538,7 @@ class LuceneSyntaxHelper
 
         // If the user has entered a lone BOOLEAN operator, convert it to lowercase
         // so it is treated as a word (otherwise it will trigger a fatal error):
-        switch(trim($input)) {
+        switch (trim($input)) {
         case 'OR':
             return 'or';
         case 'AND':
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollectionFactory.php
index 8378112f195..30245196c0a 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/RecordCollectionFactory.php
@@ -102,5 +102,4 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
         }
         return $collection;
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/Spellcheck.php b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/Spellcheck.php
index 0c34d883594..93b465c8446 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/Spellcheck.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Solr/Response/Json/Spellcheck.php
@@ -202,5 +202,4 @@ class Spellcheck implements IteratorAggregate, Countable
     {
         return (strlen($b) - strlen($a));
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Response/RecordCollectionFactory.php b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Response/RecordCollectionFactory.php
index 74e77b2a1e0..9019bad04f4 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Response/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/Response/RecordCollectionFactory.php
@@ -104,5 +104,4 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
         }
         return $collection;
     }
-
 }
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 8cc145e5e39..e1db1ee8574 100644
--- a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php
+++ b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/Response/XML/RecordCollectionFactory.php
@@ -104,5 +104,4 @@ class RecordCollectionFactory implements RecordCollectionFactoryInterface
         }
         return $collection;
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Response/AbstractRecordCollection.php b/module/VuFindSearch/src/VuFindSearch/Response/AbstractRecordCollection.php
index 0ac5ae10d0a..528ac37542c 100644
--- a/module/VuFindSearch/src/VuFindSearch/Response/AbstractRecordCollection.php
+++ b/module/VuFindSearch/src/VuFindSearch/Response/AbstractRecordCollection.php
@@ -223,5 +223,4 @@ abstract class AbstractRecordCollection implements RecordCollectionInterface
     {
         return count($this->records);
     }
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Response/RecordCollectionInterface.php b/module/VuFindSearch/src/VuFindSearch/Response/RecordCollectionInterface.php
index ef08511ee59..d11078114a6 100644
--- a/module/VuFindSearch/src/VuFindSearch/Response/RecordCollectionInterface.php
+++ b/module/VuFindSearch/src/VuFindSearch/Response/RecordCollectionInterface.php
@@ -102,5 +102,4 @@ interface RecordCollectionInterface extends \Countable, \Iterator
      * @return void
      */
     public function add(RecordInterface $record);
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Response/RecordInterface.php b/module/VuFindSearch/src/VuFindSearch/Response/RecordInterface.php
index d9a66fc3569..0a36c9ab12a 100644
--- a/module/VuFindSearch/src/VuFindSearch/Response/RecordInterface.php
+++ b/module/VuFindSearch/src/VuFindSearch/Response/RecordInterface.php
@@ -56,5 +56,4 @@ interface RecordInterface
      * @return string
      */
     public function getSourceIdentifier();
-
 }
diff --git a/module/VuFindSearch/src/VuFindSearch/Service.php b/module/VuFindSearch/src/VuFindSearch/Service.php
index 2eaf853ff37..2b01dae9f5c 100644
--- a/module/VuFindSearch/src/VuFindSearch/Service.php
+++ b/module/VuFindSearch/src/VuFindSearch/Service.php
@@ -242,7 +242,7 @@ class Service
             } elseif ($total_records < $limit) {
                 // Result set smaller than limit? Get everything and shuffle:
                 try {
-                     $response = $backend->search($query, 0, $limit, $params);
+                    $response = $backend->search($query, 0, $limit, $params);
                 } catch (BackendException $e) {
                     $this->triggerError($e, $args);
                     throw $e;
@@ -413,5 +413,4 @@ class Service
     {
         $this->getEventManager()->trigger(self::EVENT_POST, $response, $args);
     }
-
 }
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php
index 83f7c2f5161..d63a57a9f43 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/BackendTest.php
@@ -245,7 +245,6 @@ class BackendTest extends \VuFindTest\Unit\TestCase
         };
         return new \VuFindSearch\Backend\EDS\Response\RecordCollectionFactory($callback);
     }
-
 }
 
 class BackendMock extends \VuFindSearch\Backend\EDS\Backend
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/Response/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/Response/RecordCollectionFactoryTest.php
index f91c1191894..36b2fcebcec 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/Response/RecordCollectionFactoryTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EDS/Response/RecordCollectionFactoryTest.php
@@ -67,7 +67,6 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase
     {
         $factory = new RecordCollectionFactory(
             function () {
-
             }
         );
         $factory->factory('bad');
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/Response/XML/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/Response/XML/RecordCollectionFactoryTest.php
index b7ba078f7da..1db36003196 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/Response/XML/RecordCollectionFactoryTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/EIT/Response/XML/RecordCollectionFactoryTest.php
@@ -67,7 +67,6 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase
     {
         $fact = new RecordCollectionFactory(
             function () {
-
             }
         );
         $coll = $fact->factory('garbage');
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/LuceneSyntaxHelperTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/LuceneSyntaxHelperTest.php
index 356094b739e..4e70f528648 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/LuceneSyntaxHelperTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/LuceneSyntaxHelperTest.php
@@ -337,10 +337,11 @@ class LuceneSyntaxHelperTest extends \VuFindTest\Unit\TestCase
             '"this : that"' => '"this : that"',
             '::::::::::::::::::::' => '',
          ];
-        foreach ($tests as $input => $expected)
-        $this->assertEquals(
-            $expected, $lh->normalizeSearchString($input)
-        );
+        foreach ($tests as $input => $expected) {
+            $this->assertEquals(
+                $expected, $lh->normalizeSearchString($input)
+            );
+        }
     }
 
     /**
@@ -371,9 +372,10 @@ class LuceneSyntaxHelperTest extends \VuFindTest\Unit\TestCase
             'index:{start TO end}' => '{start TO end}',
             'es\\"caped field:test' => 'es\\"caped test'
         ];
-        foreach ($tests as $input => $expected)
-        $this->assertEquals(
-            $expected, $lh->extractSearchTerms($input)
-        );
+        foreach ($tests as $input => $expected) {
+            $this->assertEquals(
+                $expected, $lh->extractSearchTerms($input)
+            );
+        }
     }
 }
diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/Response/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/Response/RecordCollectionFactoryTest.php
index 65d363568a5..078cc17af22 100644
--- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/Response/RecordCollectionFactoryTest.php
+++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Summon/Response/RecordCollectionFactoryTest.php
@@ -67,7 +67,6 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase
     {
         $factory = new RecordCollectionFactory(
             function () {
-
             }
         );
         $factory->factory('bad');
-- 
GitLab