From 748ddfa9cb3962f11ec8fbb73661eec7f077ea7b Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 23 Aug 2012 14:08:50 -0400 Subject: [PATCH] More comment cleanup. --- module/VuFind/src/VuFind/Connection/SRU.php | 2 +- .../src/VuFind/Controller/AbstractBase.php | 2 +- .../VuFind/Controller/Plugin/Favorites.php | 12 ++++----- module/VuFind/src/VuFind/Db/Row/Resource.php | 17 ++++++------ module/VuFind/src/VuFind/Db/Row/User.php | 4 +-- .../src/VuFind/Db/Table/ChangeTracker.php | 10 +++---- .../VuFind/src/VuFind/Db/Table/Comments.php | 6 ++--- .../src/VuFind/Db/Table/OaiResumption.php | 2 +- .../VuFind/src/VuFind/Db/Table/Resource.php | 8 +++--- .../src/VuFind/Db/Table/ResourceTags.php | 2 +- module/VuFind/src/VuFind/Db/Table/Search.php | 2 +- module/VuFind/src/VuFind/Db/Table/Session.php | 2 +- module/VuFind/src/VuFind/Db/Table/Tags.php | 4 +-- .../src/VuFind/Db/Table/UserResource.php | 2 +- module/VuFind/src/VuFind/Mailer.php | 27 ++++++++++--------- module/VuFind/src/VuFind/Mailer/SMS.php | 10 +++---- module/VuFind/src/VuFind/OAI/Server.php | 2 +- module/VuFind/src/VuFind/Record.php | 2 +- .../src/VuFind/RecordDriver/AbstractBase.php | 8 +++--- .../VuFind/src/VuFind/Search/Base/Results.php | 2 +- module/VuFind/src/VuFind/Search/UrlHelper.php | 4 +-- .../VuFind/Theme/Root/Helper/ResultFeed.php | 4 +-- 22 files changed, 69 insertions(+), 65 deletions(-) diff --git a/module/VuFind/src/VuFind/Connection/SRU.php b/module/VuFind/src/VuFind/Connection/SRU.php index d8ec5531b70..4b7ba95e964 100644 --- a/module/VuFind/src/VuFind/Connection/SRU.php +++ b/module/VuFind/src/VuFind/Connection/SRU.php @@ -258,7 +258,7 @@ class SRU /** * Check for HTTP errors in a response. * - * @param Zend_Http_Response $result The response to check. + * @param \Zend\Http\Response $result The response to check. * * @throws \Exception * @return void diff --git a/module/VuFind/src/VuFind/Controller/AbstractBase.php b/module/VuFind/src/VuFind/Controller/AbstractBase.php index 7fce8281f31..672473a3df9 100644 --- a/module/VuFind/src/VuFind/Controller/AbstractBase.php +++ b/module/VuFind/src/VuFind/Controller/AbstractBase.php @@ -100,7 +100,7 @@ class AbstractBase extends AbstractActionController /** * Get the view renderer * - * @return object + * @return \Zend\View\Renderer\RendererInterface */ protected function getViewRenderer() { diff --git a/module/VuFind/src/VuFind/Controller/Plugin/Favorites.php b/module/VuFind/src/VuFind/Controller/Plugin/Favorites.php index aa89a5f70fc..cbd59244e9b 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/Favorites.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/Favorites.php @@ -45,13 +45,13 @@ class Favorites extends AbstractPlugin /** * Save a group of records to the user's favorites. * - * @param array $params Array with some or all of these keys: + * @param array $params Array with some or all of these keys: * <ul> * <li>ids - Array of IDs in source|id format</li> * <li>mytags - Unparsed tag string to associate with record (optional)</li> * <li>list - ID of list to save record into (omit to create new list)</li> * </ul> - * @param Zend_Db_Table_Row $user The user saving the record + * @param \VuFind\Db\Row\User $user The user saving the record * * @return void */ @@ -93,10 +93,10 @@ class Favorites extends AbstractPlugin /** * Delete a group of favorites. * - * @param array $ids Array of IDs in source|id format. - * @param mixed $listID ID of list to delete from (null for - * all lists) - * @param Zend_Db_Table_Row_Abstract $user Logged in user + * @param array $ids Array of IDs in source|id format. + * @param mixed $listID ID of list to delete from (null for all + * lists) + * @param \VuFind\Db\Row\User $user Logged in user * * @return void */ diff --git a/module/VuFind/src/VuFind/Db/Row/Resource.php b/module/VuFind/src/VuFind/Db/Row/Resource.php index 1b7e0c2a2a9..1fb5aaac40a 100644 --- a/module/VuFind/src/VuFind/Db/Row/Resource.php +++ b/module/VuFind/src/VuFind/Db/Row/Resource.php @@ -57,8 +57,8 @@ class Resource extends RowGateway /** * Remove tags from the current resource. * - * @param Zend_Db_Table_Row $user The user deleting the tags. - * @param string $list_id The list associated with the tags + * @param \VuFind\Db\Row\User $user The user deleting the tags. + * @param string $list_id The list associated with the tags * (optional -- omitting this will delete ALL of the user's tags). * * @return void @@ -72,9 +72,10 @@ class Resource extends RowGateway /** * Add a tag to the current resource. * - * @param string $tagText The tag to save. - * @param Zend_Db_Table_Row $user The user posting the tag. - * @param string $list_id The list associated with the tag (optional). + * @param string $tagText The tag to save. + * @param \VuFind\Db\Row\User $user The user posting the tag. + * @param string $list_id The list associated with the tag + * (optional). * * @return void */ @@ -95,11 +96,11 @@ class Resource extends RowGateway /** * Add a comment to the current resource. * - * @param string $comment The comment to save. - * @param Zend_Db_Table_Row $user The user posting the comment. + * @param string $comment The comment to save. + * @param \VuFind\Db\Row\User $user The user posting the comment. * * @throws LoginRequiredException - * @return int ID of newly-created comment. + * @return int ID of newly-created comment. */ public function addComment($comment, $user) { diff --git a/module/VuFind/src/VuFind/Db/Row/User.php b/module/VuFind/src/VuFind/Db/Row/User.php index 0e64413f8cd..99748250e66 100644 --- a/module/VuFind/src/VuFind/Db/Row/User.php +++ b/module/VuFind/src/VuFind/Db/Row/User.php @@ -111,7 +111,7 @@ class User extends RowGateway * filter). * @param string $source Filter for tags tied to a specific record source. * - * @return Zend_Db_Table_Rowset + * @return \Zend\Db\ResultSet\AbstractResultSet */ public function getTags($resourceId = null, $listId = null, $source = 'VuFind') { @@ -194,7 +194,7 @@ class User extends RowGateway /** * Get all of the lists associated with this user. * - * @return Zend_Db_Table_Rowset + * @return \Zend\Db\ResultSet\AbstractResultSet */ public function getLists() { diff --git a/module/VuFind/src/VuFind/Db/Table/ChangeTracker.php b/module/VuFind/src/VuFind/Db/Table/ChangeTracker.php index c2689bbf324..bb5e428655c 100644 --- a/module/VuFind/src/VuFind/Db/Table/ChangeTracker.php +++ b/module/VuFind/src/VuFind/Db/Table/ChangeTracker.php @@ -55,7 +55,7 @@ class ChangeTracker extends Gateway * @param string $core The Solr core holding the record. * @param string $id The ID of the record being indexed. * - * @return Zend_Db_Table_Row_Abstract|null + * @return \VuFind\Db\Row\ChangeTracker|null */ public function retrieve($core, $id) { @@ -69,7 +69,7 @@ class ChangeTracker extends Gateway * @param string $from The beginning date of the range to search. * @param string $until The end date of the range to search. * - * @return Zend_Db_Table_Rowset + * @return \Zend\Db\ResultSet\AbstractResultSet */ public function retrieveDeleted($core, $from, $until) { @@ -90,7 +90,7 @@ class ChangeTracker extends Gateway * @param string $core The Solr core holding the record. * @param string $id The ID of the record being indexed. * - * @return Zend_Db_Table_Row_Abstract + * @return \VuFind\Db\Row\ChangeTracker */ public function retrieveOrCreate($core, $id) { @@ -112,7 +112,7 @@ class ChangeTracker extends Gateway * @param string $core The Solr core holding the record. * @param string $id The ID of the record being indexed. * - * @return Zend_Db_Table_Row_Abstract + * @return \VuFind\Db\Row\ChangeTracker */ public function markDeleted($core, $id) { @@ -142,7 +142,7 @@ class ChangeTracker extends Gateway * @param string $id The ID of the record being indexed. * @param int $change The timestamp of the last record change. * - * @return Zend_Db_Table_Row_Abstract + * @return \VuFind\Db\Row\ChangeTracker */ public function index($core, $id, $change) { diff --git a/module/VuFind/src/VuFind/Db/Table/Comments.php b/module/VuFind/src/VuFind/Db/Table/Comments.php index 267513d8b0c..fcdd004ee74 100644 --- a/module/VuFind/src/VuFind/Db/Table/Comments.php +++ b/module/VuFind/src/VuFind/Db/Table/Comments.php @@ -52,7 +52,7 @@ class Comments extends Gateway * @param string $id Record ID to look up * @param string $source Source of record to look up * - * @return array|Zend_Db_Table_Rowset_Abstract + * @return array|\Zend\Db\ResultSet\AbstractResultSet */ public function getForResource($id, $source = 'VuFind') { @@ -78,8 +78,8 @@ class Comments extends Gateway /** * Delete a comment if the owner is logged in. Returns true on success. * - * @param int $id ID of row to delete - * @param Zend_Db_Table_Row_Abstract $user Logged in user object + * @param int $id ID of row to delete + * @param \VuFind\Db\Row\User $user Logged in user object * * @return bool */ diff --git a/module/VuFind/src/VuFind/Db/Table/OaiResumption.php b/module/VuFind/src/VuFind/Db/Table/OaiResumption.php index 5cb5696ead3..bb14a0be64c 100644 --- a/module/VuFind/src/VuFind/Db/Table/OaiResumption.php +++ b/module/VuFind/src/VuFind/Db/Table/OaiResumption.php @@ -66,7 +66,7 @@ class OaiResumption extends Gateway * * @param string $token The resumption token to retrieve. * - * @return Zend_Db_Table_Row_Abstract|null + * @return \VuFind\Db\Row\OaiResumption|null */ public function findToken($token) { diff --git a/module/VuFind/src/VuFind/Db/Table/Resource.php b/module/VuFind/src/VuFind/Db/Table/Resource.php index 375cd154fb3..85aae3e19c0 100644 --- a/module/VuFind/src/VuFind/Db/Table/Resource.php +++ b/module/VuFind/src/VuFind/Db/Table/Resource.php @@ -59,7 +59,7 @@ class Resource extends Gateway * resource being created (optional -- improves efficiency if provided, but will * be auto-loaded as needed if left null). * - * @return Zend_Db_Table_Row|null Matching row if found or created, null + * @return \VuFind\Db\Row\Resource|null Matching row if found or created, null * otherwise. */ public function findResource($id, $source = 'VuFind', $create = true, @@ -97,7 +97,7 @@ class Resource extends Gateway * @param array $ids Array of IDs * @param string $source Source of records to look up * - * @return Zend_Db_Table_Rowset + * @return \Zend\Db\ResultSet\AbstractResultSet */ public function findResources($ids, $source = 'VuFind') { @@ -119,7 +119,7 @@ class Resource extends Gateway * @param int $offset Offset for results * @param int $limit Limit for results (null for none) * - * @return Zend_Db_Table_Rowset + * @return \Zend\Db\ResultSet\AbstractResultSet */ public function getFavorites($userId, $listId = null, $tags = array(), $sort = null, $offset = 0, $limit = null @@ -180,7 +180,7 @@ class Resource extends Gateway * Get a set of records that do not have metadata stored in the resource * table. * - * @return Zend_Db_Table_Rowset + * @return \Zend\Db\ResultSet\AbstractResultSet */ public function findMissingMetadata() { diff --git a/module/VuFind/src/VuFind/Db/Table/ResourceTags.php b/module/VuFind/src/VuFind/Db/Table/ResourceTags.php index a452abad0d3..63bf3fcc014 100644 --- a/module/VuFind/src/VuFind/Db/Table/ResourceTags.php +++ b/module/VuFind/src/VuFind/Db/Table/ResourceTags.php @@ -135,7 +135,7 @@ class ResourceTags extends Gateway * @param string $userId ID of user owning favorite list * @param string $listId ID of list to retrieve (null for all favorites) * - * @return Zend_Db_Table_Rowset + * @return \Zend\Db\ResultSet\AbstractResultSet */ public function getResourcesForTag($tag, $userId, $listId = null) { diff --git a/module/VuFind/src/VuFind/Db/Table/Search.php b/module/VuFind/src/VuFind/Db/Table/Search.php index 37054eb3695..e48e499d7d2 100644 --- a/module/VuFind/src/VuFind/Db/Table/Search.php +++ b/module/VuFind/src/VuFind/Db/Table/Search.php @@ -107,7 +107,7 @@ class Search extends Gateway * missing? * * @throws \Exception - * @return Zend_Db_Table_Row + * @return \VuFind\Db\Row\Search */ public function getRowById($id, $exceptionIfMissing = true) { diff --git a/module/VuFind/src/VuFind/Db/Table/Session.php b/module/VuFind/src/VuFind/Db/Table/Session.php index 02abf15ee3d..e3398d41ad0 100644 --- a/module/VuFind/src/VuFind/Db/Table/Session.php +++ b/module/VuFind/src/VuFind/Db/Table/Session.php @@ -54,7 +54,7 @@ class Session extends Gateway * @param string $sid Session ID to retrieve * @param bool $create Should we create rows that don't already exist? * - * @return Zend_Db_Table_Row_Abstract + * @return \VuFind\Db\Row\Session */ public function getBySessionId($sid, $create = true) { diff --git a/module/VuFind/src/VuFind/Db/Table/Tags.php b/module/VuFind/src/VuFind/Db/Table/Tags.php index a334fa52904..f845a74151e 100644 --- a/module/VuFind/src/VuFind/Db/Table/Tags.php +++ b/module/VuFind/src/VuFind/Db/Table/Tags.php @@ -53,7 +53,7 @@ class Tags extends Gateway * @param string $tag Tag to look up. * @param bool $create Should we create the row if it does not exist? * - * @return Zend_Db_Table_Row|null Matching row if found or created, null + * @return \VuFind\Db\Row\Tags|null Matching row if found or created, null * otherwise. */ public function getByText($tag, $create = true) @@ -72,7 +72,7 @@ class Tags extends Gateway * * @param string $text Tag to look up. * - * @return array of Zend_Db_Table_Row + * @return array Array of \VuFind\Db\Row\Tags objects */ public function matchText($text) { diff --git a/module/VuFind/src/VuFind/Db/Table/UserResource.php b/module/VuFind/src/VuFind/Db/Table/UserResource.php index 25b2a2e1b85..5172c77d1f3 100644 --- a/module/VuFind/src/VuFind/Db/Table/UserResource.php +++ b/module/VuFind/src/VuFind/Db/Table/UserResource.php @@ -57,7 +57,7 @@ class UserResource extends Gateway * @param int $userId Optional user ID (to limit results to a particular * user). * - * @return Zend_Db_Table_Rowset + * @return \Zend\Db\ResultSet\AbstractResultSet */ public function getSavedData($resourceId, $source = 'VuFind', $listId = null, $userId = null diff --git a/module/VuFind/src/VuFind/Mailer.php b/module/VuFind/src/VuFind/Mailer.php index 38b480ea0c1..7b25274084f 100644 --- a/module/VuFind/src/VuFind/Mailer.php +++ b/module/VuFind/src/VuFind/Mailer.php @@ -156,12 +156,15 @@ class Mailer /** * Send an email message representing a link. * - * @param string $to Recipient email address - * @param string $from Sender email address - * @param string $msg User notes to include in message - * @param string $url URL to share - * @param Zend_View $view View object (used to render email templates) - * @param string $subject Subject for email (optional) + * @param string $to Recipient email address + * @param string $from Sender email address + * @param string $msg User notes to include in + * message + * @param string $url URL to share + * @param \Zend\View\Renderer\RendererInterface $view View object (used to + * render email templates) + * @param string $subject Subject for email + * (optional) * * @throws MailException * @return void @@ -184,13 +187,13 @@ class Mailer /** * Send an email message representing a record. * - * @param string $to Recipient email address - * @param string $from Sender email address - * @param string $msg User notes to include in + * @param string $to Recipient email address + * @param string $from Sender email address + * @param string $msg User notes to include in * message - * @param \VuFind\RecordDriver\AbstractBase $record Record being emailed - * @param Zend_View $view View object (used to render - * email templates) + * @param \VuFind\RecordDriver\AbstractBase $record Record being emailed + * @param \Zend\View\Renderer\RendererInterface $view View object (used to + * render email templates) * * @throws MailException * @return void diff --git a/module/VuFind/src/VuFind/Mailer/SMS.php b/module/VuFind/src/VuFind/Mailer/SMS.php index 3255057c8b4..fd975954b5d 100644 --- a/module/VuFind/src/VuFind/Mailer/SMS.php +++ b/module/VuFind/src/VuFind/Mailer/SMS.php @@ -127,11 +127,11 @@ class SMS extends Mailer /** * Send a text message representing a record. * - * @param string $provider The provider ID to send to - * @param string $to Recipient phone number - * @param \VuFind\RecordDriver\AbstractBase $record Record being emailed - * @param Zend_View $view View object (used to render - * email templates) + * @param string $provider Target SMS provider + * @param string $to Recipient phone number + * @param \VuFind\RecordDriver\AbstractBase $record Record being emailed + * @param \Zend\View\Renderer\RendererInterface $view View object (used to + * render email templates) * * @throws MailException * @return void diff --git a/module/VuFind/src/VuFind/OAI/Server.php b/module/VuFind/src/VuFind/OAI/Server.php index 77bd4dc5041..c48a5bb24cf 100644 --- a/module/VuFind/src/VuFind/OAI/Server.php +++ b/module/VuFind/src/VuFind/OAI/Server.php @@ -532,7 +532,7 @@ class Server * @param int $from Start date. * @param int $until End date. * - * @return Zend_Db_Table_Rowset + * @return \Zend\Db\ResultSet\AbstractResultSet */ protected function listRecordsGetDeleted($from, $until) { diff --git a/module/VuFind/src/VuFind/Record.php b/module/VuFind/src/VuFind/Record.php index 31d016daefe..4e66e458611 100644 --- a/module/VuFind/src/VuFind/Record.php +++ b/module/VuFind/src/VuFind/Record.php @@ -203,7 +203,7 @@ class Record } } - // Check for missing records and fill gaps with VF_RecordDriver_Missing + // Check for missing records and fill gaps with \VuFind\RecordDriver\Missing // objects: foreach ($ids as $i => $details) { if (!isset($retVal[$i]) || !is_object($retVal[$i])) { diff --git a/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php b/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php index 7cfa0e1e1b9..a1109c61fc6 100644 --- a/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php +++ b/module/VuFind/src/VuFind/RecordDriver/AbstractBase.php @@ -125,8 +125,8 @@ abstract class AbstractBase /** * Add tags to the record. * - * @param Zend_Db_Table_Row $user The user posting the tag - * @param string $tags The user-provided tag string + * @param \VuFind\Db\Row\User $user The user posting the tag + * @param string $tags The user-provided tag string * * @return void */ @@ -143,13 +143,13 @@ abstract class AbstractBase /** * Save this record to the user's favorites. * - * @param array $params Array with some or all of these keys: + * @param array $params Array with some or all of these keys: * <ul> * <li>mytags - Unparsed tag string to associate with record (optional)</li> * <li>notes - Notes to associate with record (optional)</li> * <li>list - ID of list to save record into (omit to create new list)</li> * </ul> - * @param Zend_Db_Table_Row $user The user saving the record + * @param \VuFind\Db\Row\User $user The user saving the record * * @return void */ diff --git a/module/VuFind/src/VuFind/Search/Base/Results.php b/module/VuFind/src/VuFind/Search/Base/Results.php index 237872ef6a9..562f776036d 100644 --- a/module/VuFind/src/VuFind/Search/Base/Results.php +++ b/module/VuFind/src/VuFind/Search/Base/Results.php @@ -314,7 +314,7 @@ abstract class Results * Given a database row corresponding to the current search object, * mark whether this search is saved and what its database ID is. * - * @param Zend_Db_Table_Row $row Relevant database row. + * @param \VuFind\Db\Row\Search $row Relevant database row. * * @return void */ diff --git a/module/VuFind/src/VuFind/Search/UrlHelper.php b/module/VuFind/src/VuFind/Search/UrlHelper.php index 1bb8f5e68ed..94482cf5ccd 100644 --- a/module/VuFind/src/VuFind/Search/UrlHelper.php +++ b/module/VuFind/src/VuFind/Search/UrlHelper.php @@ -321,8 +321,8 @@ class UrlHelper * Return HTTP parameters to render the current page with a different view * parameter. * - * Note: This is called setViewParam rather than setView to avoid a conflict - * with the Zend_View_Helper_Abstract interface. + * Note: This is called setViewParam rather than setView to avoid confusion + * with the \Zend\View\Helper\AbstractHelper interface. * * @param string $v New sort parameter (null for NO view parameter) * @param bool $escape Should we escape the string for use in the view? diff --git a/module/VuFind/src/VuFind/Theme/Root/Helper/ResultFeed.php b/module/VuFind/src/VuFind/Theme/Root/Helper/ResultFeed.php index 8aacdce474c..7033dba60cf 100644 --- a/module/VuFind/src/VuFind/Theme/Root/Helper/ResultFeed.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/ResultFeed.php @@ -92,7 +92,7 @@ class ResultFeed extends AbstractHelper * @param string $currentPath Base path to display in feed * (leave null to load dynamically using currentpath view helper) * - * @return Zend_Feed_Writer_Feed + * @return Feed */ public function __invoke($results, $currentPath = null) { @@ -133,7 +133,7 @@ class ResultFeed extends AbstractHelper /** * Support method to turn a record driver object into an RSS entry. * - * @param Zend_Feed_Writer_Feed $feed Feed to update + * @param Feed $feed Feed to update * @param \VuFind\RecordDriver\AbstractBase $record Record to add to feed * * @return void -- GitLab