From d0c315b7144c49081a37ba85dd39c4906e83c374 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 25 Apr 2014 13:53:48 -0400 Subject: [PATCH] PHPMD cleanup. --- module/VuFind/src/VuFind/Cover/Generator.php | 5 ++--- module/VuFind/src/VuFind/ILS/Driver/Demo.php | 1 + module/VuFind/src/VuFind/ILS/Driver/LBS4.php | 1 + module/VuFind/src/VuFind/RecordDriver/Factory.php | 4 +--- module/VuFind/src/VuFind/RecordDriver/Primo.php | 1 + .../src/VuFindAdmin/Controller/TagsController.php | 5 ++--- .../src/VuFindSearch/Backend/LibGuides/QueryBuilder.php | 1 + 7 files changed, 9 insertions(+), 9 deletions(-) diff --git a/module/VuFind/src/VuFind/Cover/Generator.php b/module/VuFind/src/VuFind/Cover/Generator.php index 8587ef505b7..f06aa6b308e 100644 --- a/module/VuFind/src/VuFind/Cover/Generator.php +++ b/module/VuFind/src/VuFind/Cover/Generator.php @@ -109,7 +109,7 @@ class Generator $this->black = imagecolorallocate($im, 0, 0, 0); // Generate seed from callnumber, title back up - $seed = $this->createSeed($title, $author, $callnumber); + $seed = $this->createSeed($title, $callnumber); // Number to color, hsb to control saturation and lightness $grid_color = $this->makeHSBColor( $im, @@ -143,12 +143,11 @@ class Generator * Generates a dynamic cover image from elements of the book * * @param string $title Title of the book - * @param string $author Author of the book * @param string $callnumber Callnumber of the book * * @return integer unique number for this record */ - protected function createSeed($title, $author, $callnumber) + protected function createSeed($title, $callnumber) { // Turn callnumber into number if (null == $callnumber) { diff --git a/module/VuFind/src/VuFind/ILS/Driver/Demo.php b/module/VuFind/src/VuFind/ILS/Driver/Demo.php index 1998053b160..14892760188 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Demo.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Demo.php @@ -843,6 +843,7 @@ class Demo extends AbstractBase * placeHold, minus the patron data. * * @return int + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getHoldDefaultRequiredDate($patron, $holdInfo) { diff --git a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php index bf31d07e759..d8b7fdf3184 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php +++ b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php @@ -345,6 +345,7 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface * @param array $callnumber The callnumber of the item * * @return string On success, a string to be displayed near the item + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function getNote($loanind, $locid, $callnumber) { diff --git a/module/VuFind/src/VuFind/RecordDriver/Factory.php b/module/VuFind/src/VuFind/RecordDriver/Factory.php index 920286a12aa..19da5e21660 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Factory.php +++ b/module/VuFind/src/VuFind/RecordDriver/Factory.php @@ -42,11 +42,9 @@ class Factory /** * Factory for LibGuides record driver. * - * @param ServiceManager $sm Service manager. - * * @return LibGuides */ - public static function getLibGuides(ServiceManager $sm) + public static function getLibGuides() { return new LibGuides(); } diff --git a/module/VuFind/src/VuFind/RecordDriver/Primo.php b/module/VuFind/src/VuFind/RecordDriver/Primo.php index 61ccba7b36a..8e5d9e9baab 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Primo.php +++ b/module/VuFind/src/VuFind/RecordDriver/Primo.php @@ -298,6 +298,7 @@ class Primo extends SolrDefault * @param string $format Export format * * @return bool + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function exportDisabled($format) { diff --git a/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php b/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php index a7f6d4ac1b3..cee44137e55 100644 --- a/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php +++ b/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php @@ -169,7 +169,7 @@ class TagsController extends AbstractAdmin } if (false === $confirm) { - return $this->confirmTagsDelete($tags, $ids, $originUrl, $newUrl); + return $this->confirmTagsDelete($ids, $originUrl, $newUrl); } $delete = $tags->deleteByIdArray($ids); @@ -194,14 +194,13 @@ class TagsController extends AbstractAdmin /** * Confirm Delete by Id * - * @param object $tagModel A tag object * @param array $ids A list of resource tag Ids * @param string $originUrl An origin url * @param string $newUrl The url of the desired action * * @return $this->confirmAction */ - protected function confirmTagsDelete($tagModel, $ids, $originUrl, $newUrl) + protected function confirmTagsDelete($ids, $originUrl, $newUrl) { $messages = array(); $count = count($ids); diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/QueryBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/QueryBuilder.php index aa2a86ff4c5..2c831a534fb 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/QueryBuilder.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/LibGuides/QueryBuilder.php @@ -97,6 +97,7 @@ class QueryBuilder * @param QueryGroup $query QueryGroup to convert * * @return array + * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function queryGroupToArray(QueryGroup $query) { -- GitLab