From 0bcc7f725ea77ff264db5edd03e4493da30c2c00 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Fri, 14 Nov 2014 07:57:45 -0500
Subject: [PATCH] Style fixes; removed unused parameter.

---
 .../VuFind/Controller/RecordController.php    |  3 +-
 .../VuFind/src/VuFind/ILS/Driver/XCNCIP2.php  | 34 ++++++++++++-------
 module/VuFind/src/VuFind/ILS/Logic/Holds.php  |  9 +++--
 3 files changed, 28 insertions(+), 18 deletions(-)

diff --git a/module/VuFind/src/VuFind/Controller/RecordController.php b/module/VuFind/src/VuFind/Controller/RecordController.php
index 2ef48e25e88..e1d72b97901 100644
--- a/module/VuFind/src/VuFind/Controller/RecordController.php
+++ b/module/VuFind/src/VuFind/Controller/RecordController.php
@@ -105,7 +105,8 @@ class RecordController extends AbstractRecord
 
         // If we're not supposed to be here, give up now!
         $catalog = $this->getILS();
-        $checkHolds = $catalog->checkFunction('Holds',
+        $checkHolds = $catalog->checkFunction(
+            'Holds',
             array(
                 'id' => $driver->getUniqueID(),
                 'patron' => $patron
diff --git a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php
index 274a32aee46..9f79133cf0c 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php
@@ -624,8 +624,11 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
      */
     public function patronLogin($username, $password)
     {
-        // TODO: we somehow need to figure out 'patron_agency_id' in the consortium=true case
-        //$request = $this->getLookupUserRequest($username, $password, 'patron_agency_id');
+        // TODO: we somehow need to figure out 'patron_agency_id' in the
+        // consortium=true case
+        //$request = $this->getLookupUserRequest(
+        //    $username, $password, 'patron_agency_id'
+        //);
         $request = $this->getLookupUserRequest($username, $password);
         $response = $this->sendRequest($request);
         $id = $response->xpath(
@@ -674,7 +677,8 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
     {
         $extras = array('<ns1:LoanedItemsDesired/>');
         $request = $this->getLookupUserRequest(
-            $patron['cat_username'], $patron['cat_password'], $patron['patron_agency_id'], $extras
+            $patron['cat_username'], $patron['cat_password'],
+            $patron['patron_agency_id'], $extras
         );
         $response = $this->sendRequest($request);
 
@@ -726,7 +730,8 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
     {
         $extras = array('<ns1:UserFiscalAccountDesired/>');
         $request = $this->getLookupUserRequest(
-            $patron['cat_username'], $patron['cat_password'], $patron['patron_agency_id'], $extras
+            $patron['cat_username'], $patron['cat_password'],
+            $patron['patron_agency_id'], $extras
         );
         $response = $this->sendRequest($request);
 
@@ -787,7 +792,8 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
     {
         $extras = array('<ns1:RequestedItemsDesired/>');
         $request = $this->getLookupUserRequest(
-            $patron['cat_username'], $patron['cat_password'], $patron['patron_agency_id'], $extras
+            $patron['cat_username'], $patron['cat_password'],
+            $patron['patron_agency_id'], $extras
         );
         $response = $this->sendRequest($request);
 
@@ -851,7 +857,8 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
             '</ns1:UserElementType>'
         );
         $request = $this->getLookupUserRequest(
-            $patron['cat_username'], $patron['cat_password'], $patron['patron_agency_id'], $extras
+            $patron['cat_username'], $patron['cat_password'],
+            $patron['patron_agency_id'], $extras
         );
         $response = $this->sendRequest($request);
 
@@ -1096,7 +1103,8 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
     {
         $extras = array('<ns1:RequestedItemsDesired/>');
         $request = $this->getLookupUserRequest(
-            $patron['cat_username'], $patron['cat_password'], $patron['patron_agency_id'], $extras
+            $patron['cat_username'], $patron['cat_password'],
+            $patron['patron_agency_id'], $extras
         );
         $response = $this->sendRequest($request);
 
@@ -1647,14 +1655,16 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf
      * Helper function to build the request XML to log in a user
      * and/or retrieve loaned items / request information
      *
-     * @param string $username Username for login
-     * @param string $password Password for login
-     * @param string $extras   Extra elements to include in the request
+     * @param string $username         Username for login
+     * @param string $password         Password for login
+     * @param string $patron_agency_id Patron agency ID (optional)
+     * @param string $extras           Extra elements to include in the request
      *
      * @return string          NCIP request XML
      */
-    protected function getLookupUserRequest($username, $password, $patron_agency_id = null, $extras = array())
-    {
+    protected function getLookupUserRequest($username, $password,
+        $patron_agency_id = null, $extras = array()
+    ) {
         $ret = '<?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 507d73f5061..defae21a3ce 100644
--- a/module/VuFind/src/VuFind/ILS/Logic/Holds.php
+++ b/module/VuFind/src/VuFind/ILS/Logic/Holds.php
@@ -185,7 +185,7 @@ class Holds
             if ($mode == "disabled") {
                 $holdings = $this->standardHoldings($result);
             } else if ($mode == "driver") {
-                $holdings = $this->driverHoldings($result, $id, $config);
+                $holdings = $this->driverHoldings($result, $config);
             } else {
                 $holdings = $this->generateHoldings($result, $mode, $config);
             }
@@ -223,13 +223,12 @@ class Holds
     /**
      * Protected method for driver defined holdings
      *
-     * @param array  $result     A result set returned from a driver
-     * @param string $id         Record ID
-     * @param array  $holdConfig Hold configuration from driver
+     * @param array $result     A result set returned from a driver
+     * @param array $holdConfig Hold configuration from driver
      *
      * @return array A sorted results set
      */
-    protected function driverHoldings($result, $id, $holdConfig)
+    protected function driverHoldings($result, $holdConfig)
     {
         $holdings = array();
 
-- 
GitLab