From 34b1353d10a194a80269f5db490fcc8039c6d866 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Fri, 17 Aug 2012 11:32:01 -0400 Subject: [PATCH] Style fixes. --- .../src/VuFind/Theme/Root/Helper/Record.php | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/module/VuFind/src/VuFind/Theme/Root/Helper/Record.php b/module/VuFind/src/VuFind/Theme/Root/Helper/Record.php index dac644147ff..6e565d32ab4 100644 --- a/module/VuFind/src/VuFind/Theme/Root/Helper/Record.php +++ b/module/VuFind/src/VuFind/Theme/Root/Helper/Record.php @@ -135,8 +135,8 @@ class Record extends AbstractHelper } /** - * Get an array of strings representing formats in which this record's - * data may be exported (empty if none). Legal values: "RefWorks", + * Get an array of strings representing formats in which this record's + * data may be exported (empty if none). Legal values: "RefWorks", * "EndNote", "MARC", "RDF". * * @return array Strings representing export formats. @@ -360,44 +360,44 @@ class Record extends AbstractHelper * * @return array */ - public function getLinkDetails() - { - // See if there are any links available: - $urls = $this->driver->tryMethod('getURLs'); - if (empty($urls)) { - return array(); - } - - // If we found links, we may need to convert from the "route" format - // to the "full URL" format. - $urlHelper = $this->getView()->plugin('url'); - $serverUrlHelper = $this->getView()->plugin('serverurl'); - $formatLink = function ($link) use ($urlHelper, $serverUrlHelper) { - // Error if route AND URL are missing at this point! - if (!isset($link['route']) && !isset($link['url'])) { - throw new \Exception('Invalid URL array.'); - } - - // Build URL from route/query details if missing: - if (!isset($link['url'])) { - $routeParams = isset($link['routeParams']) + public function getLinkDetails() + { + // See if there are any links available: + $urls = $this->driver->tryMethod('getURLs'); + if (empty($urls)) { + return array(); + } + + // If we found links, we may need to convert from the "route" format + // to the "full URL" format. + $urlHelper = $this->getView()->plugin('url'); + $serverUrlHelper = $this->getView()->plugin('serverurl'); + $formatLink = function ($link) use ($urlHelper, $serverUrlHelper) { + // Error if route AND URL are missing at this point! + if (!isset($link['route']) && !isset($link['url'])) { + throw new \Exception('Invalid URL array.'); + } + + // Build URL from route/query details if missing: + if (!isset($link['url'])) { + $routeParams = isset($link['routeParams']) ? $link['routeParams'] : array(); - $link['url'] = $serverUrlHelper( - $urlHelper($link['route'], $routeParams) - ); - if (isset($link['queryString'])) { - $link['url'] .= $link['queryString']; - } - } - - // Use URL as description if missing: - if (!isset($link['desc'])) { - $link['desc'] = $link['url']; - } - return $link; - }; - - return array_map($formatLink, $urls); - } + $link['url'] = $serverUrlHelper( + $urlHelper($link['route'], $routeParams) + ); + if (isset($link['queryString'])) { + $link['url'] .= $link['queryString']; + } + } + + // Use URL as description if missing: + if (!isset($link['desc'])) { + $link['desc'] = $link['url']; + } + return $link; + }; + + return array_map($formatLink, $urls); + } } \ No newline at end of file -- GitLab