From 43214e2fe083f902f4f6989e4ade40291fc2d2ee Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 10 Feb 2015 14:09:59 -0500 Subject: [PATCH] php-cs-fixer: concat_with_spaces --- module/VuDL/src/VuDL/Connection/Fedora.php | 12 +- module/VuDL/src/VuDL/Connection/Manager.php | 2 +- module/VuDL/src/VuDL/Connection/Solr.php | 20 +-- .../src/VuDL/Controller/VudlController.php | 2 +- module/VuFind/src/VuFind/Auth/CAS.php | 2 +- module/VuFind/src/VuFind/Auth/Shibboleth.php | 4 +- module/VuFind/src/VuFind/Config/Writer.php | 4 +- .../VuFind/src/VuFind/Connection/Oracle.php | 24 ++-- .../src/VuFind/Connection/Wikipedia.php | 4 +- .../src/VuFind/Controller/AjaxController.php | 4 +- .../VuFind/Controller/BrowseController.php | 4 +- .../src/VuFind/Controller/CoverController.php | 2 +- .../src/VuFind/Controller/EdsController.php | 10 +- .../VuFind/Controller/FeedbackController.php | 6 +- .../VuFind/Controller/InstallController.php | 26 ++-- .../Controller/MyResearchController.php | 4 +- .../src/VuFind/Controller/Plugin/NewItems.php | 2 +- .../VuFind/Controller/SearchController.php | 2 +- .../VuFind/Controller/SummonController.php | 2 +- .../src/VuFind/Db/Table/UserStatsFields.php | 8 +- module/VuFind/src/VuFind/ILS/Connection.php | 2 +- .../VuFind/src/VuFind/ILS/Driver/Amicus.php | 80 +++++------ .../src/VuFind/ILS/Driver/ClaviusSQL.php | 2 +- module/VuFind/src/VuFind/ILS/Driver/DAIA.php | 8 +- module/VuFind/src/VuFind/ILS/Driver/Demo.php | 8 +- .../src/VuFind/ILS/Driver/Evergreen.php | 24 ++-- .../VuFind/src/VuFind/ILS/Driver/Horizon.php | 14 +- .../src/VuFind/ILS/Driver/HorizonXMLAPI.php | 12 +- .../src/VuFind/ILS/Driver/Innovative.php | 2 +- module/VuFind/src/VuFind/ILS/Driver/LBS4.php | 136 +++++++++--------- .../src/VuFind/ILS/Driver/NewGenLib.php | 2 +- module/VuFind/src/VuFind/ILS/Driver/PICA.php | 10 +- .../VuFind/src/VuFind/ILS/Driver/Polaris.php | 4 +- .../VuFind/src/VuFind/ILS/Driver/Sierra.php | 4 +- .../VuFind/src/VuFind/ILS/Driver/Symphony.php | 2 +- .../VuFind/src/VuFind/ILS/Driver/Unicorn.php | 8 +- .../VuFind/src/VuFind/ILS/Driver/Virtua.php | 46 +++--- .../VuFind/src/VuFind/ILS/Driver/Voyager.php | 78 +++++----- .../src/VuFind/ILS/Driver/VoyagerRestful.php | 8 +- .../VuFind/src/VuFind/ILS/Driver/XCNCIP2.php | 6 +- module/VuFind/src/VuFind/ILS/Logic/Holds.php | 2 +- .../src/VuFind/ILS/Logic/TitleHolds.php | 2 +- module/VuFind/src/VuFind/Log/Logger.php | 2 +- .../VuFind/src/VuFind/Recommend/DPLATerms.php | 2 +- .../src/VuFind/Recommend/SideFacets.php | 2 +- module/VuFind/src/VuFind/RecordDriver/EDS.php | 4 +- .../VuFind/src/VuFind/Search/EDS/Options.php | 10 +- .../VuFind/src/VuFind/Search/EDS/Params.php | 8 +- .../src/VuFind/Search/Favorites/Results.php | 2 +- .../src/VuFind/Search/Pazpar2/Params.php | 2 +- .../src/VuFind/Search/Primo/Results.php | 2 +- .../VuFind/src/VuFind/Search/Solr/Params.php | 4 +- .../VuFind/src/VuFind/Search/Solr/Results.php | 4 +- .../VuFind/Search/Solr/SpellingProcessor.php | 2 +- .../src/VuFind/Search/UrlQueryHelper.php | 2 +- module/VuFind/src/VuFind/SimpleXML.php | 2 +- .../VuFind/src/VuFind/Sitemap/Generator.php | 4 +- module/VuFind/src/VuFind/Sitemap/Sitemap.php | 2 +- .../src/VuFind/Statistics/Driver/File.php | 4 +- .../src/VuFind/Statistics/Driver/Solr.php | 4 +- .../Controller/Plugin/NewItemsTest.php | 2 +- .../VuFindAdmin/Controller/TagsController.php | 4 +- .../src/VuFindSearch/Backend/EDS/Base.php | 16 +-- .../VuFindSearch/Backend/EDS/QueryBuilder.php | 4 +- .../VuFindSearch/Backend/EIT/QueryBuilder.php | 2 +- .../VuFindSearch/Backend/SRU/Connector.php | 2 +- .../Backend/Summon/QueryBuilder.php | 2 +- .../Backend/WorldCat/QueryBuilder.php | 2 +- .../src/VuFindTheme/LessCompiler.php | 2 +- 69 files changed, 351 insertions(+), 351 deletions(-) diff --git a/module/VuDL/src/VuDL/Connection/Fedora.php b/module/VuDL/src/VuDL/Connection/Fedora.php index df4e3a2362f..0f4418b454c 100644 --- a/module/VuDL/src/VuDL/Connection/Fedora.php +++ b/module/VuDL/src/VuDL/Connection/Fedora.php @@ -187,7 +187,7 @@ class Fedora extends AbstractBase public function getLabel($id) { $query = 'select $memberTitle from <#ri> ' - . 'where $member <dc:identifier> \''. $id .'\' ' + . 'where $member <dc:identifier> \'' . $id . '\' ' . 'and $member <fedora-model:label> $memberTitle'; $response = $this->query($query); $list = explode("\n", $response->getBody()); @@ -204,7 +204,7 @@ class Fedora extends AbstractBase public function getMemberList($root) { $query = 'select $memberPID $memberTitle from <#ri> ' - . 'where $member <fedora-rels-ext:isMemberOf> <info:fedora/' .$root. '> ' + . 'where $member <fedora-rels-ext:isMemberOf> <info:fedora/' . $root . '> ' . 'and $member <fedora-model:label> $memberTitle ' . 'and $member <dc:identifier> $memberPID'; $response = $this->query($query); @@ -234,7 +234,7 @@ class Fedora extends AbstractBase . 'where $member ' . '<info:fedora/fedora-system:def/view#lastModifiedDate> ' . '$lastModDate ' - . 'and $member <dc:identifier> \''. $id .'\''; + . 'and $member <dc:identifier> \'' . $id . '\''; $response = $this->query($query); $list = explode("\n", $response->getBody()); return $list[1]; @@ -250,7 +250,7 @@ class Fedora extends AbstractBase public function getOrderedMembers($root) { $query = 'select $memberPID $memberTitle $sequence $member from <#ri> ' - . 'where $member <fedora-rels-ext:isMemberOf> <info:fedora/'.$root.'> ' + . 'where $member <fedora-rels-ext:isMemberOf> <info:fedora/' . $root . '> ' . 'and $member <http://vudl.org/relationships#sequence> $sequence ' . 'and $member <fedora-model:label> $memberTitle ' . 'and $member <dc:identifier> $memberPID'; @@ -291,7 +291,7 @@ class Fedora extends AbstractBase } // No sequence? Title sort. $query = 'select $memberPID $memberTitle from <#ri> ' - . 'where $member <fedora-rels-ext:isMemberOf> <info:fedora/' .$root. '> ' + . 'where $member <fedora-rels-ext:isMemberOf> <info:fedora/' . $root . '> ' . 'and $member <fedora-model:label> $memberTitle ' . 'and $member <dc:identifier> $memberPID ' . 'order by $memberTitle'; @@ -323,7 +323,7 @@ class Fedora extends AbstractBase // Walk to get all parents to root $query = 'select $child $parent $parentTitle from <#ri> ' . 'where walk (' - . '<info:fedora/' .$id. '> ' + . '<info:fedora/' . $id . '> ' . '<fedora-rels-ext:isMemberOf> ' . '$parent ' . 'and $child <fedora-rels-ext:isMemberOf> $parent) ' diff --git a/module/VuDL/src/VuDL/Connection/Manager.php b/module/VuDL/src/VuDL/Connection/Manager.php index e88cd097612..4c475524570 100644 --- a/module/VuDL/src/VuDL/Connection/Manager.php +++ b/module/VuDL/src/VuDL/Connection/Manager.php @@ -106,7 +106,7 @@ class Manager $index ++; } throw new \Exception( - 'VuDL Connection Failed to resolved method "'.$methodName.'"' + 'VuDL Connection Failed to resolved method "' . $methodName . '"' ); } } \ No newline at end of file diff --git a/module/VuDL/src/VuDL/Connection/Solr.php b/module/VuDL/src/VuDL/Connection/Solr.php index b8ec3661168..5ac83817db8 100644 --- a/module/VuDL/src/VuDL/Connection/Solr.php +++ b/module/VuDL/src/VuDL/Connection/Solr.php @@ -71,7 +71,7 @@ class Solr extends AbstractBase $response = $this->search( new ParamBag( array( - 'q' => 'id:"'.$id.'"', + 'q' => 'id:"' . $id . '"', 'fl' => 'modeltype_str_mv', ) ) @@ -102,7 +102,7 @@ class Solr extends AbstractBase if ($response = $this->search( new ParamBag( array( - 'q' => 'id:"'.$id.'"' + 'q' => 'id:"' . $id . '"' ) ) )) { @@ -128,7 +128,7 @@ class Solr extends AbstractBase $response = $this->search( new ParamBag( array( - 'q' => 'id:"'.$id.'"', + 'q' => 'id:"' . $id . '"', 'fl' => $labelField, ) ) @@ -154,7 +154,7 @@ class Solr extends AbstractBase $response = $this->search( new ParamBag( array( - 'q' => 'relsext.isMemberOf:"'.$root.'"', + 'q' => 'relsext.isMemberOf:"' . $root . '"', 'fl' => 'id,hierarchy_top_title', 'rows' => 100, ) @@ -190,7 +190,7 @@ class Solr extends AbstractBase if ($response = $this->search( new ParamBag( array( - 'q' => 'id:"'.$id.'"', + 'q' => 'id:"' . $id . '"', 'fl' => $modfield, ) ) @@ -213,15 +213,15 @@ class Solr extends AbstractBase public function getOrderedMembers($id, $extra_sort = array()) { // Try to find members in order - $seqField = 'sequence_'.str_replace(':', '_', $id).'_str'; - $sort = array($seqField.' asc'); + $seqField = 'sequence_' . str_replace(':', '_', $id) . '_str'; + $sort = array($seqField . ' asc'); foreach ($extra_sort as $sf) { $sort[] = $sf; } $response = $this->search( new ParamBag( array( - 'q' => 'relsext.isMemberOf:"'.$id.'"', + 'q' => 'relsext.isMemberOf:"' . $id . '"', 'sort' => implode(',', $sort), 'fl' => 'id', 'rows' => 99999, @@ -265,7 +265,7 @@ class Solr extends AbstractBase $response = $this->search( new ParamBag( array( - 'q' => 'id:"'.$current.'"', + 'q' => 'id:"' . $current . '"', 'fl' => 'hierarchy_parent_id,hierarchy_parent_title', ) ) @@ -310,7 +310,7 @@ class Solr extends AbstractBase $response = $this->search( new ParamBag( array( - 'q' => 'id:"'.$id.'"', + 'q' => 'id:"' . $id . '"', 'fl' => $licenseField ) ) diff --git a/module/VuDL/src/VuDL/Controller/VudlController.php b/module/VuDL/src/VuDL/Controller/VudlController.php index beb77496315..deddfdf635b 100644 --- a/module/VuDL/src/VuDL/Controller/VudlController.php +++ b/module/VuDL/src/VuDL/Controller/VudlController.php @@ -213,7 +213,7 @@ class VudlController extends AbstractVuDL $data['keys'] = array_keys($data); try { $view = $renderer->render( - 'vudl/views/'.$data['filetype'].'.phtml', + 'vudl/views/' . $data['filetype'] . '.phtml', $data ); } catch(\Exception $e) { diff --git a/module/VuFind/src/VuFind/Auth/CAS.php b/module/VuFind/src/VuFind/Auth/CAS.php index 6a83695866f..e3b121d70ef 100644 --- a/module/VuFind/src/VuFind/Auth/CAS.php +++ b/module/VuFind/src/VuFind/Auth/CAS.php @@ -248,7 +248,7 @@ class CAS extends AbstractBase // Throw an exception if attributes are missing/empty. if (empty($sortedUserAttributes[$value])) { throw new AuthException( - "User attribute value of " . $value. " is missing!" + "User attribute value of " . $value . " is missing!" ); } } diff --git a/module/VuFind/src/VuFind/Auth/Shibboleth.php b/module/VuFind/src/VuFind/Auth/Shibboleth.php index 7e2b2526b9a..ec072621953 100644 --- a/module/VuFind/src/VuFind/Auth/Shibboleth.php +++ b/module/VuFind/src/VuFind/Auth/Shibboleth.php @@ -86,7 +86,7 @@ class Shibboleth extends AbstractBase // Check if required attributes match up: foreach ($this->getRequiredAttributes() as $key => $value) { - if (!preg_match('/'. $value .'/', $request->getServer()->get($key))) { + if (!preg_match('/' . $value . '/', $request->getServer()->get($key))) { throw new AuthException('authentication_error_denied'); } } @@ -222,7 +222,7 @@ class Shibboleth extends AbstractBase // Throw an exception if attributes are missing/empty. if (empty($sortedUserAttributes[$value])) { throw new AuthException( - "User attribute value of " . $value. " is missing!" + "User attribute value of " . $value . " is missing!" ); } } diff --git a/module/VuFind/src/VuFind/Config/Writer.php b/module/VuFind/src/VuFind/Config/Writer.php index b253965b17e..e9003451787 100644 --- a/module/VuFind/src/VuFind/Config/Writer.php +++ b/module/VuFind/src/VuFind/Config/Writer.php @@ -211,7 +211,7 @@ class Writer $tabStr .= ' '; } - return $key . $tabStr . "= ". $this->buildContentValue($value); + return $key . $tabStr . "= " . $this->buildContentValue($value); } /** @@ -256,7 +256,7 @@ class Writer if (isset($comments['sections'][$key]['before'])) { $content .= $comments['sections'][$key]['before']; } - $content .= "[".$key."]"; + $content .= "[" . $key . "]"; if (!empty($comments['sections'][$key]['inline'])) { $content .= "\t" . $comments['sections'][$key]['inline']; } diff --git a/module/VuFind/src/VuFind/Connection/Oracle.php b/module/VuFind/src/VuFind/Connection/Oracle.php index 598d4e9af3f..46d29ff1e6e 100644 --- a/module/VuFind/src/VuFind/Connection/Oracle.php +++ b/module/VuFind/src/VuFind/Connection/Oracle.php @@ -323,7 +323,7 @@ class Oracle $stmt = $this->prepare($sql); foreach ($fields as $field => $datum) { list($column, $type) = explode(":", $field); - $this->bindParam($stmt, ":".$column, $datum, $type); + $this->bindParam($stmt, ":" . $column, $datum, $type); } if ($this->exec($stmt)) { @@ -361,12 +361,12 @@ class Oracle // Prepare the SQL for child table - turn the columns in placeholders for // the bind - $sql = "DELETE FROM $table WHERE ".join(" AND ", $clauses); + $sql = "DELETE FROM $table WHERE " . join(" AND ", $clauses); $delete = $this->prepare($sql); // Bind Variables foreach (array_keys($data) as $column) { - $this->bindParam($delete, ":".$column, $data[$column], $types[$column]); + $this->bindParam($delete, ":" . $column, $data[$column], $types[$column]); } // Execute @@ -409,19 +409,19 @@ class Oracle $columns[] = $column; // Dates are special if (count($tmp) > 0 && !is_null($datum)) { - $values[] = "TO_DATE(:$column, '".join(":", $tmp)."')"; + $values[] = "TO_DATE(:$column, '" . join(":", $tmp) . "')"; } else { $values[] = ":$column"; } } - $sql = "INSERT INTO $table (".join(", ", $columns).") VALUES (". - join(", ", $values).")"; + $sql = "INSERT INTO $table (" . join(", ", $columns) . ") VALUES (" . + join(", ", $values) . ")"; $insert = $this->prepare($sql); // Bind Variables foreach (array_keys($data) as $column) { - $this->bindParam($insert, ":".$column, $data[$column], $types[$column]); + $this->bindParam($insert, ":" . $column, $data[$column], $types[$column]); } // Execute @@ -449,7 +449,7 @@ class Oracle $stmt = $this->prepare($sql); foreach ($fields as $field => $datum) { list($column, $type) = explode(":", $field); - $this->bindParam($stmt, ":".$column, $datum, $type); + $this->bindParam($stmt, ":" . $column, $datum, $type); } if ($this->exec($stmt)) { $this->commit(); @@ -535,7 +535,7 @@ class Oracle // Generic stuff $output = "<b>ORACLE ERROR</b><br/>\n"; - $output .= "Oracle '".$this->lastErrorType."' Error<br />\n"; + $output .= "Oracle '" . $this->lastErrorType . "' Error<br />\n"; $output .= "=============<br />\n"; foreach ($this->lastError as $key => $value) { $output .= "($key) => $value<br />\n"; @@ -547,21 +547,21 @@ class Oracle $output .= "=============<br />\n"; $output .= "Offset into SQL:<br />\n"; $output .= - substr($this->lastError['sqltext'], $this->lastError['offset']). + substr($this->lastError['sqltext'], $this->lastError['offset']) . "\n"; break; case 'executing': $output .= "=============<br />\n"; $output .= "Offset into SQL:<br />\n"; $output .= - substr($this->lastError['sqltext'], $this->lastError['offset']). + substr($this->lastError['sqltext'], $this->lastError['offset']) . "<br />\n"; if (count($this->lastErrorFields) > 0) { $output .= "=============<br />\n"; $output .= "Bind Variables:<br />\n"; foreach ($this->lastErrorFields as $k => $l) { if (is_array($l)) { - $output .= "$k => (".join(", ", $l).")<br />\n"; + $output .= "$k => (" . join(", ", $l) . ")<br />\n"; } else { $output .= "$k => $l<br />\n"; } diff --git a/module/VuFind/src/VuFind/Connection/Wikipedia.php b/module/VuFind/src/VuFind/Connection/Wikipedia.php index 701a3ccb87d..68dbcb2fb8b 100644 --- a/module/VuFind/src/VuFind/Connection/Wikipedia.php +++ b/module/VuFind/src/VuFind/Connection/Wikipedia.php @@ -202,7 +202,7 @@ class Wikipedia implements TranslatorAwareInterface foreach ($infoboxTags as $tag) { if (substr($m, 0, strlen($tag) + 1) == '{' . $tag) { // We found an infobox!! - return "{".$m."}"; + return "{" . $m . "}"; } } } @@ -262,7 +262,7 @@ class Wikipedia implements TranslatorAwareInterface // We can either find content or recursive brackets: $recursive_match = "($content|(?R))*"; $body .= "[[file:bad]]"; - preg_match_all("/".$open.$recursive_match.$close."/Us", $body, $new_matches); + preg_match_all("/" . $open . $recursive_match . $close . "/Us", $body, $new_matches); // Loop through every match (link) we found if (is_array($new_matches)) { foreach ($new_matches as $nm) { diff --git a/module/VuFind/src/VuFind/Controller/AjaxController.php b/module/VuFind/src/VuFind/Controller/AjaxController.php index fdc2f84e3e2..3752acc2a81 100644 --- a/module/VuFind/src/VuFind/Controller/AjaxController.php +++ b/module/VuFind/src/VuFind/Controller/AjaxController.php @@ -554,8 +554,8 @@ class AjaxController extends AbstractBase */ public static function storeError($errno, $errstr, $errfile, $errline) { - self::$php_errors[] = "ERROR [$errno] - ".$errstr."<br />\n" - . " Occurred in ".$errfile." on line ".$errline."."; + self::$php_errors[] = "ERROR [$errno] - " . $errstr . "<br />\n" + . " Occurred in " . $errfile . " on line " . $errline . "."; return true; } diff --git a/module/VuFind/src/VuFind/Controller/BrowseController.php b/module/VuFind/src/VuFind/Controller/BrowseController.php index 6733a5642cb..d532d978067 100644 --- a/module/VuFind/src/VuFind/Controller/BrowseController.php +++ b/module/VuFind/src/VuFind/Controller/BrowseController.php @@ -260,7 +260,7 @@ class BrowseController extends AbstractBase $view->paramTitle .= 'filter[]=dewey-ones:'; break; default: - $view->paramTitle .= 'filter[]='.$this->getCategory().':'; + $view->paramTitle .= 'filter[]=' . $this->getCategory() . ':'; } $view->paramTitle = str_replace( '+AND+', @@ -635,7 +635,7 @@ class BrowseController extends AbstractBase protected function quoteValues($array) { foreach ($array as $i => $result) { - $result['value'] = '"'.$result['value'].'"'; + $result['value'] = '"' . $result['value'] . '"'; $array[$i] = $result; } return $array; diff --git a/module/VuFind/src/VuFind/Controller/CoverController.php b/module/VuFind/src/VuFind/Controller/CoverController.php index 5a778598a47..fbe772e559f 100644 --- a/module/VuFind/src/VuFind/Controller/CoverController.php +++ b/module/VuFind/src/VuFind/Controller/CoverController.php @@ -134,7 +134,7 @@ class CoverController extends AbstractBase $coverImageTtl = (60*60*24*14); // 14 days $headers->addHeaderLine( - 'Cache-Control', "maxage=".$coverImageTtl + 'Cache-Control', "maxage=" . $coverImageTtl ); $headers->addHeaderLine( 'Pragma', 'public' diff --git a/module/VuFind/src/VuFind/Controller/EdsController.php b/module/VuFind/src/VuFind/Controller/EdsController.php index a48d3ae95c8..5838d5ea76d 100644 --- a/module/VuFind/src/VuFind/Controller/EdsController.php +++ b/module/VuFind/src/VuFind/Controller/EdsController.php @@ -158,13 +158,13 @@ class EdsController extends AbstractSearch if (isset($list['LimiterValues'])) { foreach ($list['LimiterValues'] as $key => $value) { // Build the filter string for the URL: - $fullFilter = $facet.':'.$value['Value']; + $fullFilter = $facet . ':' . $value['Value']; // If we haven't already found a selected facet and the current // facet has been applied to the search, we should store it as // the selected facet for the current control. if ($searchObject) { - $limitFilt = 'LIMIT|'.$fullFilter; + $limitFilt = 'LIMIT|' . $fullFilter; if ($searchObject->getParams()->hasFilter($limitFilt)) { $facetList[$facet]['LimiterValues'][$key]['selected'] = true; @@ -202,7 +202,7 @@ class EdsController extends AbstractSearch // Process the expanders, assuming they came back foreach ($availableExpanders as $key => $value) { if ($searchObject) { - $expandFilt = 'EXPAND:'.$value['Value']; + $expandFilt = 'EXPAND:' . $value['Value']; if ($searchObject->getParams()->hasFilter($expandFilt)) { $availableExpanders[$key]['selected'] = true; // Remove the filter from the search object -- we don't want @@ -239,7 +239,7 @@ class EdsController extends AbstractSearch $to = $range['to'] == '*' ? '12' : $range['to']; } $searchObject->getParams() - ->removeFilter($key.':'.$value[0]['value']); + ->removeFilter($key . ':' . $value[0]['value']); break; } } @@ -263,7 +263,7 @@ class EdsController extends AbstractSearch // Process the facets, assuming they came back foreach ($searchModes as $key => $mode) { if ($searchObject) { - $modeFilter = 'SEARCHMODE:'.$mode['Value']; + $modeFilter = 'SEARCHMODE:' . $mode['Value']; if ($searchObject->getParams()->hasFilter($modeFilter)) { $searchModes[$key]['selected'] = true; // Remove the filter from the search object -- we don't want diff --git a/module/VuFind/src/VuFind/Controller/FeedbackController.php b/module/VuFind/src/VuFind/Controller/FeedbackController.php index 3949d9ef6f4..e217340c7ed 100644 --- a/module/VuFind/src/VuFind/Controller/FeedbackController.php +++ b/module/VuFind/src/VuFind/Controller/FeedbackController.php @@ -79,9 +79,9 @@ class FeedbackController extends AbstractBase throw new \Exception('Feedback Module Error: Comment Post Failed'); } - $email_message = 'Name: '.$name."\n"; - $email_message .= 'Email: '.$users_email."\n"; - $email_message .= 'Comments: '.$comments."\n"; + $email_message = 'Name: ' . $name . "\n"; + $email_message .= 'Email: ' . $users_email . "\n"; + $email_message .= 'Comments: ' . $comments . "\n"; // This sets up the email to be sent $mail = new Mail\Message(); diff --git a/module/VuFind/src/VuFind/Controller/InstallController.php b/module/VuFind/src/VuFind/Controller/InstallController.php index a8f6591e60a..22514d1e77d 100644 --- a/module/VuFind/src/VuFind/Controller/InstallController.php +++ b/module/VuFind/src/VuFind/Controller/InstallController.php @@ -267,10 +267,10 @@ class InstallController extends AbstractBase if (!function_exists('mb_substr')) { $msg = "Your PHP installation appears to be missing the mbstring plug-in." - ." For better language support, it is recommended that you add this." - ." For details on how to do this, see " - ."http://vufind.org/wiki/vufind2:installation_notes " - ."and look at the PHP installation instructions for your platform."; + . " For better language support, it is recommended that you add this." + . " For details on how to do this, see " + . "http://vufind.org/wiki/vufind2:installation_notes " + . "and look at the PHP installation instructions for your platform."; $this->flashMessenger()->setNamespace('error')->addMessage($msg); $problems++; } @@ -291,10 +291,10 @@ class InstallController extends AbstractBase if (!function_exists('mcrypt_module_open')) { $msg = "Your PHP installation appears to be missing the mcrypt plug-in." - ." For better security support, it is recommended that you add this." - ." For details on how to do this, see " - ."http://vufind.org/wiki/vufind2:installation_notes " - ."and look at the PHP installation instructions for your platform."; + . " For better security support, it is recommended that you add this." + . " For details on how to do this, see " + . "http://vufind.org/wiki/vufind2:installation_notes " + . "and look at the PHP installation instructions for your platform."; $this->flashMessenger()->setNamespace('error')->addMessage($msg); $problems++; } @@ -303,9 +303,9 @@ class InstallController extends AbstractBase if (!class_exists('XSLTProcessor')) { $msg = "Your PHP installation appears to be missing the XSL plug-in." - ." For details on how to do this, see " - ."http://vufind.org/wiki/vufind2:installation_notes " - ."and look at the PHP installation instructions for your platform."; + . " For details on how to do this, see " + . "http://vufind.org/wiki/vufind2:installation_notes " + . "and look at the PHP installation instructions for your platform."; $this->flashMessenger()->setNamespace('error')->addMessage($msg); $problems++; } @@ -474,7 +474,7 @@ class InstallController extends AbstractBase $grantTables = "GRANT ALL PRIVILEGES ON ALL TABLES IN " . "SCHEMA public TO {$view->dbuser} "; $grantSequences = "GRANT ALL PRIVILEGES ON ALL SEQUENCES" - ." IN SCHEMA public TO {$view->dbuser} "; + . " IN SCHEMA public TO {$view->dbuser} "; return array($grantTables, $grantSequences); } // Default: MySQL: @@ -711,7 +711,7 @@ class InstallController extends AbstractBase if (!isset($config->Authentication->ils_encryption_key) || empty($config->Authentication->ils_encryption_key) ) { - $enc_key = sha1(microtime(true).mt_rand(10000, 90000)); + $enc_key = sha1(microtime(true) . mt_rand(10000, 90000)); $writer->set('Authentication', 'ils_encryption_key', $enc_key); $changed = true; } diff --git a/module/VuFind/src/VuFind/Controller/MyResearchController.php b/module/VuFind/src/VuFind/Controller/MyResearchController.php index ba4739338ff..d2715cfac75 100644 --- a/module/VuFind/src/VuFind/Controller/MyResearchController.php +++ b/module/VuFind/src/VuFind/Controller/MyResearchController.php @@ -483,12 +483,12 @@ class MyResearchController extends AbstractBase $lists = $this->params()->fromPost('lists'); $tagParser = $this->getServiceLocator()->get('VuFind\Tags'); foreach ($lists as $list) { - $tags = $this->params()->fromPost('tags'.$list); + $tags = $this->params()->fromPost('tags' . $list); $driver->saveToFavorites( array( 'list' => $list, 'mytags' => $tagParser->parse($tags), - 'notes' => $this->params()->fromPost('notes'.$list) + 'notes' => $this->params()->fromPost('notes' . $list) ), $user ); diff --git a/module/VuFind/src/VuFind/Controller/Plugin/NewItems.php b/module/VuFind/src/VuFind/Controller/Plugin/NewItems.php index 757bfa2e850..dc55b98acb2 100644 --- a/module/VuFind/src/VuFind/Controller/Plugin/NewItems.php +++ b/module/VuFind/src/VuFind/Controller/Plugin/NewItems.php @@ -199,6 +199,6 @@ class NewItems extends AbstractPlugin */ public function getSolrFilter($range) { - return 'first_indexed:[NOW-' . $range .'DAY TO NOW]'; + return 'first_indexed:[NOW-' . $range . 'DAY TO NOW]'; } } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Controller/SearchController.php b/module/VuFind/src/VuFind/Controller/SearchController.php index 4a2ba539b72..84f7eb60efb 100644 --- a/module/VuFind/src/VuFind/Controller/SearchController.php +++ b/module/VuFind/src/VuFind/Controller/SearchController.php @@ -208,7 +208,7 @@ class SearchController extends AbstractSearch foreach ($list['list'] as $key => $value) { // Build the filter string for the URL: $fullFilter = ($value['operator'] == 'OR' ? '~' : '') - . $facet.':"'.$value['value'].'"'; + . $facet . ':"' . $value['value'] . '"'; // If we haven't already found a selected facet and the current // facet has been applied to the search, we should store it as diff --git a/module/VuFind/src/VuFind/Controller/SummonController.php b/module/VuFind/src/VuFind/Controller/SummonController.php index 0097f11a5e9..2edd70e0154 100644 --- a/module/VuFind/src/VuFind/Controller/SummonController.php +++ b/module/VuFind/src/VuFind/Controller/SummonController.php @@ -212,7 +212,7 @@ class SummonController extends AbstractSearch foreach ($list['list'] as $key => $value) { // Build the filter string for the URL: $fullFilter = ($value['operator'] == 'OR' ? '~' : '') - . $facet.':"'.$value['value'].'"'; + . $facet . ':"' . $value['value'] . '"'; // If we haven't already found a selected facet and the current // facet has been applied to the search, we should store it as diff --git a/module/VuFind/src/VuFind/Db/Table/UserStatsFields.php b/module/VuFind/src/VuFind/Db/Table/UserStatsFields.php index fe8a1bffe11..c2c95f16166 100644 --- a/module/VuFind/src/VuFind/Db/Table/UserStatsFields.php +++ b/module/VuFind/src/VuFind/Db/Table/UserStatsFields.php @@ -98,11 +98,11 @@ class UserStatsFields extends Gateway ); $select->where->equalTo('field', $fields[0]); for ($i = 1;$i<count($fields);$i++) { - $select->where->equalTo('field'.$i.'.field', $fields[$i]); + $select->where->equalTo('field' . $i . '.field', $fields[$i]); $select->join( - array('field'.$i => 'user_stats_fields'), - 'user_stats_fields.id=field'.$i.'.id', - array($fields[$i] => 'field'.$i.'.value') + array('field' . $i => 'user_stats_fields'), + 'user_stats_fields.id=field' . $i . '.id', + array($fields[$i] => 'field' . $i . '.value') ); } foreach ($values as $key => $value) { diff --git a/module/VuFind/src/VuFind/ILS/Connection.php b/module/VuFind/src/VuFind/ILS/Connection.php index a1f6003b1ec..c4b00c4fa42 100644 --- a/module/VuFind/src/VuFind/ILS/Connection.php +++ b/module/VuFind/src/VuFind/ILS/Connection.php @@ -222,7 +222,7 @@ class Connection implements TranslatorAwareInterface ) ? $this->getDriver()->getConfig($function, $params) : false; // See if we have a corresponding check method to analyze the response: - $checkMethod = "checkMethod".$function; + $checkMethod = "checkMethod" . $function; if (!method_exists($this, $checkMethod)) { return false; } diff --git a/module/VuFind/src/VuFind/ILS/Driver/Amicus.php b/module/VuFind/src/VuFind/ILS/Driver/Amicus.php index 11508a7827b..402cbe6263f 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Amicus.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Amicus.php @@ -222,7 +222,7 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface */ protected function sacaFecha($copyId) { - $circulacion = "SELECT to_char(CIRT_ITM_DUE_DTE,'dd-mm-yyyy') AS FECHADEV, ". + $circulacion = "SELECT to_char(CIRT_ITM_DUE_DTE,'dd-mm-yyyy') AS FECHADEV, " . "ROUND(CIRT_ITM_DUE_DTE - SYSDATE) AS DIFERENCIA " . "FROM CIRT_ITM " . "WHERE CPY_ID_NBR = '$copyId'"; @@ -255,8 +255,8 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface */ protected function sacaReservas($holdingId) { - $reservas = "SELECT COUNT(*) as reservados ". - "FROM CIRTN_HLD ". + $reservas = "SELECT COUNT(*) as reservados " . + "FROM CIRTN_HLD " . "WHERE CPY_ID_NBR = '$holdingId'"; $reservados = 0; @@ -297,11 +297,11 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface "CPY_ID_NBR " . "from CPY_ID, SHLF_LIST, T_LCTN_NME_BUO " . "where CPY_ID.SHLF_LIST_KEY_NBR = SHLF_LIST.SHLF_LIST_KEY_NBR " . - "and CPY_ID.LCTN_NME_CDE = T_LCTN_NME_BUO.TBL_VLU_CDE ". + "and CPY_ID.LCTN_NME_CDE = T_LCTN_NME_BUO.TBL_VLU_CDE " . "and CPY_ID.BIB_ITM_NBR = '$id'"; - $multipleLoc = "SELECT COUNT(DISTINCT(SHLF_LIST_KEY_NBR)) AS multiple ". - "FROM CPY_ID ". + $multipleLoc = "SELECT COUNT(DISTINCT(SHLF_LIST_KEY_NBR)) AS multiple " . + "FROM CPY_ID " . "WHERE CPY_ID.BIB_ITM_NBR = '$id'"; try { @@ -447,14 +447,14 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface { include_once 'File/MARC.php'; - $items = "select CPY_ID.BRCDE_NBR, CPY_ID.BIB_ITM_NBR, ". - "T_LCTN_NME_BUO.TBL_LNG_ENG_TXT ". + $items = "select CPY_ID.BRCDE_NBR, CPY_ID.BIB_ITM_NBR, " . + "T_LCTN_NME_BUO.TBL_LNG_ENG_TXT " . "as LOCATION, SHLF_LIST_SRT_FORM as CALLNUMBER, CPY_ID.CPY_ID_NBR as " . "CPY_ID_NBR " . "from CPY_ID, SHLF_LIST, T_LCTN_NME_BUO " . "where CPY_ID.SHLF_LIST_KEY_NBR = SHLF_LIST.SHLF_LIST_KEY_NBR " . - "AND CPY_ID.LCTN_NME_CDE = T_LCTN_NME_BUO.TBL_VLU_CDE ". - "and CPY_ID.BIB_ITM_NBR = '$id' ". + "AND CPY_ID.LCTN_NME_CDE = T_LCTN_NME_BUO.TBL_VLU_CDE " . + "and CPY_ID.BIB_ITM_NBR = '$id' " . "order by SHLF_LIST_SRT_FORM ASC, CPY_ID.CPY_ID_NBR ASC"; $possibleQueries = array($items); @@ -555,8 +555,8 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface */ public function patronLogin($barcode, $lname) { - $sql = "SELECT LOGIN , PASSWORD AS FIRST_NAME ". - "FROM LV_USER ". + $sql = "SELECT LOGIN , PASSWORD AS FIRST_NAME " . + "FROM LV_USER " . "WHERE PASSWORD = '$lname' AND LOGIN = '$barcode'"; try { @@ -601,9 +601,9 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface $transList = array(); $sql = "SELECT TO_CHAR(CIRT_ITM.CIRT_ITM_DUE_DTE,'DD/MM/YYYY') " . - "AS DUEDATE, CIRT_ITM.BIB_ITM_NBR AS BIB_ID ". - "FROM LV_USER, CIRT_ITM ". - "WHERE LV_USER.PRSN_NBR = CIRT_ITM.PRSN_NBR ". + "AS DUEDATE, CIRT_ITM.BIB_ITM_NBR AS BIB_ID " . + "FROM LV_USER, CIRT_ITM " . + "WHERE LV_USER.PRSN_NBR = CIRT_ITM.PRSN_NBR " . "AND LV_USER.LOGIN = '" . $patron['id'] . "'"; try { $sqlStmt = $this->db->prepare($sql); @@ -633,13 +633,13 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface { $fineList = array(); - $sql = "SELECT UNIQUE TO_CHAR(CIRT_ITM.CIRT_ITM_CHRG_OUT_DTE,'DD/MM/YYYY') ". - "AS ORIG_CHARGE_DATE, ". - "TO_CHAR(CIRT_ITM.CIRT_ITM_DUE_DTE,'DD/MM/YYYY') AS DUE_DATE, ". - "CIRT_ITM.BIB_ITM_NBR AS BIB_ID ". - "FROM CIRT_ITM, LV_USER ". - "WHERE CIRT_ITM.PRSN_NBR = LV_USER.PRSN_NBR ". - "AND CIRT_ITM_DUE_DTE < SYSDATE ". + $sql = "SELECT UNIQUE TO_CHAR(CIRT_ITM.CIRT_ITM_CHRG_OUT_DTE,'DD/MM/YYYY') " . + "AS ORIG_CHARGE_DATE, " . + "TO_CHAR(CIRT_ITM.CIRT_ITM_DUE_DTE,'DD/MM/YYYY') AS DUE_DATE, " . + "CIRT_ITM.BIB_ITM_NBR AS BIB_ID " . + "FROM CIRT_ITM, LV_USER " . + "WHERE CIRT_ITM.PRSN_NBR = LV_USER.PRSN_NBR " . + "AND CIRT_ITM_DUE_DTE < SYSDATE " . "AND LV_USER.LOGIN='" . $patron['id'] . "'"; try { $sqlStmt = $this->db->prepare($sql); @@ -675,8 +675,8 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface "CIRTN_HLD.CIRTN_HLD_TYP_CDE AS HOLD_RECALL_TYPE, " . "TO_CHAR(CIRTN_HLD.TME_HLD_END_DTE,'DD/MM/YYYY') AS EXPIRE_DATE, " . "TO_CHAR(CIRTN_HLD.CIRTN_HLD_CRTE_DTE,'DD/MM/YYYY') AS " . - "CREATE_DATE FROM CIRTN_HLD, LV_USER ". - "WHERE CIRTN_HLD.PRSN_NBR = LV_USER.PRSN_NBR ". + "CREATE_DATE FROM CIRTN_HLD, LV_USER " . + "WHERE CIRTN_HLD.PRSN_NBR = LV_USER.PRSN_NBR " . "AND LV_USER.LOGIN = '" . $patron['id'] . "'"; try { $sqlStmt = $this->db->prepare($sql); @@ -707,21 +707,21 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface public function getMyProfile($patron) { $sql = "SELECT DISTINCT PRSN.PRSN_NBR AS UNO, (SELECT p1.PRSN_CMCTN_NBR " . - "FROM PRSN_CMCTN p1 ". - "WHERE p1.prsn_nbr = PRSN.prsn_nbr AND PRSN_CMCTN_TYP_CDE = 7) tfno, ". + "FROM PRSN_CMCTN p1 " . + "WHERE p1.prsn_nbr = PRSN.prsn_nbr AND PRSN_CMCTN_TYP_CDE = 7) tfno, " . "(SELECT p1.PRSN_CMCTN_NBR FROM PRSN_CMCTN p1 WHERE p1.prsn_nbr = " . - "PRSN.prsn_nbr AND ". - "PRSN_CMCTN_TYP_CDE = 1) email, ". + "PRSN.prsn_nbr AND " . + "PRSN_CMCTN_TYP_CDE = 1) email, " . "PRSN.PRSN_SRNME_SRT_FORM AS LAST_NAME, PRSN.PRSN_1ST_NME_SRT_FORM " . - "AS FIRST_NAME, ". + "AS FIRST_NAME, " . "CONCAT(PSTL_ADR_ST_NME,CONCAT(' ',CONCAT(PSTL_ADR_ST_NBR,CONCAT(' ', " . "CONCAT(PSTL_ADR_FLR_NBR,CONCAT(' ',PSTL_ADR_RM_NBR)))))) " . - "AS ADDRESS_LINE1, PRSN_PSTL_ADR.PSTL_ADR_CTY_NME ". - "AS ADDRESS_LINE2, PRSN_PSTL_ADR.PSTL_ADR_PSTL_CDE AS ZIP_POSTAL ". - "FROM PRSN, PRSN_CMCTN, PRSN_PSTL_ADR, LV_USER ". - "WHERE PRSN_CMCTN.PRSN_nbr = PRSN.PRSN_NBR (+) ". - "AND PRSN.PRSN_NBR = PRSN_PSTL_ADR.PRSN_NBR (+) ". - "AND LV_USER.PRSN_NBR = PRSN.PRSN_NBR ". + "AS ADDRESS_LINE1, PRSN_PSTL_ADR.PSTL_ADR_CTY_NME " . + "AS ADDRESS_LINE2, PRSN_PSTL_ADR.PSTL_ADR_PSTL_CDE AS ZIP_POSTAL " . + "FROM PRSN, PRSN_CMCTN, PRSN_PSTL_ADR, LV_USER " . + "WHERE PRSN_CMCTN.PRSN_nbr = PRSN.PRSN_NBR (+) " . + "AND PRSN.PRSN_NBR = PRSN_PSTL_ADR.PRSN_NBR (+) " . + "AND LV_USER.PRSN_NBR = PRSN.PRSN_NBR " . "AND LV_USER.LOGIN = UPPER('" . $patron['id'] . "')"; try { @@ -761,7 +761,7 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface */ public function getHoldLink($recordId, $details) { - return $this->config['Catalog']['hold'].$recordId; + return $this->config['Catalog']['hold'] . $recordId; } /** @@ -890,7 +890,7 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface $sql = "select distinct(BIB_ITM_NBR) as BIB_ID " . - "FROM CPY_ID, SHLF_LIST ". + "FROM CPY_ID, SHLF_LIST " . "WHERE CPY_ID.SHLF_LIST_KEY_NBR = SHLF_LIST.SHLF_LIST_KEY_NBR " . "AND UPPER(SUBSTR(SHLF_LIST.SHLF_LIST_STRNG_TEXT,3,20)) LIKE " . "UPPER('" . $dept . "%') " . @@ -951,9 +951,9 @@ class Amicus extends AbstractBase implements TranslatorAwareInterface public function getSuppressedRecords() { $list = array(); - $sql = "SELECT BIB_AUT_ITM_NBR as BIB_ID ". - "FROM CTLGG_TRSTN_ACTVT_LOG ". - "WHERE STATS_TRSTN_TYP_CDE = 4 ". + $sql = "SELECT BIB_AUT_ITM_NBR as BIB_ID " . + "FROM CTLGG_TRSTN_ACTVT_LOG " . + "WHERE STATS_TRSTN_TYP_CDE = 4 " . "AND trstn_log_tmest >= SYSDATE -30"; try { $sqlStmt = $this->db->prepare($sql); diff --git a/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php b/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php index ed441cad349..ad5168bfe32 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php +++ b/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php @@ -248,7 +248,7 @@ class ClaviusSQL extends AbstractBase . "WHERE s.datumvloz > DATE_SUB(CURDATE(),INTERVAL " . $this->db->quote($daysOld) . " DAY) AND s.datumvloz <= DATE_SUB(CURDATE(),INTERVAL " - . $this->db->quote($this->hideNewItemsDays) ." DAY)"; + . $this->db->quote($this->hideNewItemsDays) . " DAY)"; if ($fundId) { $sql .= " AND s.lokace = " . $this->db->quote($fundId); } diff --git a/module/VuFind/src/VuFind/ILS/Driver/DAIA.php b/module/VuFind/src/VuFind/ILS/Driver/DAIA.php index 1eb66299604..30542d607b9 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/DAIA.php +++ b/module/VuFind/src/VuFind/ILS/Driver/DAIA.php @@ -474,7 +474,7 @@ class DAIA extends AbstractBase implements \Zend\Log\LoggerAwareInterface if ($storageElements->item(0)->nodeValue === 'Internet') { $href = $storageElements->item(0)->attributes ->getNamedItem('href')->nodeValue; - $storage = '<a href="'.$href.'">'.$href.'</a>'; + $storage = '<a href="' . $href . '">' . $href . '</a>'; } else { $storage = $storageElements->item(0)->nodeValue; } @@ -512,7 +512,7 @@ class DAIA extends AbstractBase implements \Zend\Log\LoggerAwareInterface $unavailHref = $unavailableElements->item($n)->attributes ->getNamedItem('href'); if ($unavailHref !== null) { - $hrefs['item'.$n] = $unavailHref->nodeValue; + $hrefs['item' . $n] = $unavailHref->nodeValue; } $expectedNode = $unavailableElements->item($n)->attributes ->getNamedItem('expected'); @@ -527,14 +527,14 @@ class DAIA extends AbstractBase implements \Zend\Log\LoggerAwareInterface // 'expected' => $expectedNode->nodeValue, // 'recall' => $unavailHref->nodeValue); //array_push($earliest, $expectedNode->nodeValue); - $earliest['item'.$n] = $expectedNode->nodeValue; + $earliest['item' . $n] = $expectedNode->nodeValue; } else { array_push($earliest, "0"); } $queueNode = $unavailableElements->item($n)->attributes ->getNamedItem('queue'); if ($queueNode !== null) { - $queue['item'.$n] = $queueNode->nodeValue; + $queue['item' . $n] = $queueNode->nodeValue; } else { array_push($queue, "0"); } diff --git a/module/VuFind/src/VuFind/ILS/Driver/Demo.php b/module/VuFind/src/VuFind/ILS/Driver/Demo.php index 3212736ba7d..45c39e1b4e2 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Demo.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Demo.php @@ -185,7 +185,7 @@ class Demo extends AbstractBase $a = $codes[rand()%strlen($codes)]; $b = rand()%899 + 100; $c = rand()%9999; - return $a.$b.".".$c; + return $a . $b . "." . $c; } /** @@ -294,7 +294,7 @@ class Demo extends AbstractBase $location = $this->getFakeLoc(false); $currentItem = array( "location" => $location, - "create" => date("j-M-y", strtotime("now - ".(rand()%10)." days")), + "create" => date("j-M-y", strtotime("now - " . (rand()%10) . " days")), "expire" => date("j-M-y", strtotime("now + 30 days")), "reqnum" => sprintf("%06d", $i), "item_id" => $i, @@ -382,7 +382,7 @@ class Demo extends AbstractBase */ public function getSimulatedStatus($id, array $patron = null) { - $id = $id.""; // make it a string for consistency + $id = $id . ""; // make it a string for consistency // How many items are there? $records = rand()%15; $holding = array(); @@ -633,7 +633,7 @@ class Demo extends AbstractBase // How many days overdue is the item? $day_overdue = rand()%30 + 5; // Calculate checkout date: - $checkout = strtotime("now - ".($day_overdue+14)." days"); + $checkout = strtotime("now - " . ($day_overdue+14) . " days"); // 50c a day fine? $fine = $day_overdue * 0.50; diff --git a/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php b/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php index 42c41da2681..c00a7163406 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Evergreen.php @@ -78,15 +78,15 @@ class Evergreen extends AbstractBase try { $this->db = new PDO( 'pgsql:host=' - .$this->config['Catalog']['hostname'] - .' user=' - .$this->config['Catalog']['user'] - .' dbname=' - .$this->config['Catalog']['database'] - .' password=' - .$this->config['Catalog']['password'] - .' port=' - .$this->config['Catalog']['port'] + . $this->config['Catalog']['hostname'] + . ' user=' + . $this->config['Catalog']['user'] + . ' dbname=' + . $this->config['Catalog']['database'] + . ' password=' + . $this->config['Catalog']['password'] + . ' port=' + . $this->config['Catalog']['port'] ); } catch (PDOException $e) { throw $e; @@ -405,11 +405,11 @@ HERE; $sql = "select billable_xact_summary.total_owed, " . "billable_xact_summary.balance_owed, " . "billable_xact_summary.last_billing_type, " . - "extract (year from billable_xact_summary.xact_start) ". + "extract (year from billable_xact_summary.xact_start) " . "as start_year, " . - "extract (month from billable_xact_summary.xact_start) ". + "extract (month from billable_xact_summary.xact_start) " . "as start_month, " . - "extract (day from billable_xact_summary.xact_start) ". + "extract (day from billable_xact_summary.xact_start) " . "as start_day, " . "billable_cirulations.target_copy " . "from $this->dbName.money.billable_xact_summary " . diff --git a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php index 19930f06cc6..ff9405d1810 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php @@ -104,19 +104,19 @@ class Horizon extends AbstractBase $modifier = isset($sql['modifier']) ? $sql['modifier'] . " " : ""; // Put String Together - $sqlString = "select ". $modifier . implode(", ", $sql['expressions']); - $sqlString .= " from " .implode(", ", $sql['from']); + $sqlString = "select " . $modifier . implode(", ", $sql['expressions']); + $sqlString .= " from " . implode(", ", $sql['from']); $sqlString .= (!empty($sql['join'])) - ? " join " .implode(" join ", $sql['join']) : ""; + ? " join " . implode(" join ", $sql['join']) : ""; $sqlString .= (!empty($sql['innerJoin'])) - ? " inner join " .implode(" inner join ", $sql['innerJoin']) : ""; + ? " inner join " . implode(" inner join ", $sql['innerJoin']) : ""; $sqlString .= (!empty($sql['leftOuterJoin'])) ? " left outer join " . implode(" left outer join ", $sql['leftOuterJoin']) : ""; - $sqlString .= " where " .implode(" AND ", $sql['where']); + $sqlString .= " where " . implode(" AND ", $sql['where']); $sqlString .= (!empty($sql['order'])) - ? " ORDER BY " .implode(", ", $sql['order']) : ""; + ? " ORDER BY " . implode(", ", $sql['order']) : ""; return $sqlString; } @@ -416,7 +416,7 @@ class Horizon extends AbstractBase $bibIDs = implode(',', $idList); // Where - $sqlWhere = array("i.bib# in (" .$bibIDs . ")", + $sqlWhere = array("i.bib# in (" . $bibIDs . ")", "i.staff_only = 0"); $sqlArray = array('expressions' => $sqlExpressions, diff --git a/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php b/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php index b2c4c6880e7..bbc605de93d 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php +++ b/module/VuFind/src/VuFind/ILS/Driver/HorizonXMLAPI.php @@ -200,7 +200,7 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter // Where $sqlWhere = array( "pls.display = 1", - "bb.bbarcode=\"".addslashes($patron['id'])."\"" + "bb.bbarcode=\"" . addslashes($patron['id']) . "\"" ); // Order by @@ -269,7 +269,7 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter $sqlJoin = array("borrower_barcode bb on bb.borrower# = b.borrower#"); // Where - $sqlWhere = array("bb.bbarcode=\"".addslashes($patron['id'])."\""); + $sqlWhere = array("bb.bbarcode=\"" . addslashes($patron['id']) . "\""); $sqlArray = array( 'expressions' => $sqlSelect, @@ -318,12 +318,12 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter foreach ($params as $key => $param) { if (is_array($param)) { foreach ($param as $sub) { - $queryString[] = $key. "=" .urlencode($sub); + $queryString[] = $key . "=" . urlencode($sub); } } else { // This is necessary as Horizon expects spaces to be represented by // "+" rather than the url_encode "%20" for Pick Up Locations - $queryString[] = $key. "=" . + $queryString[] = $key . "=" . str_replace("%20", "+", urlencode($param)); } } @@ -866,7 +866,7 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter */ public function getRenewDetails($checkOutDetails) { - $renewDetails = $checkOutDetails['item_id']."|".$checkOutDetails['barcode']; + $renewDetails = $checkOutDetails['item_id'] . "|" . $checkOutDetails['barcode']; return $renewDetails; } @@ -884,7 +884,7 @@ class HorizonXMLAPI extends Horizon implements \VuFindHttp\HttpServiceAwareInter */ public function getCancelHoldDetails($holdDetails) { - $cancelDetails = $holdDetails['id']."|".$holdDetails['item_id']; + $cancelDetails = $holdDetails['id'] . "|" . $holdDetails['item_id']; return $cancelDetails; } } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/ILS/Driver/Innovative.php b/module/VuFind/src/VuFind/ILS/Driver/Innovative.php index 96dc8ead654..601128c11ad 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Innovative.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Innovative.php @@ -318,7 +318,7 @@ class Innovative extends AbstractBase implements //Build request link $link = $this->config['Catalog']['url'] . '/search?/.b' . $id_ . '/.b' . - $id_ . '/1%2C1%2C1%2CB/request~b'. $id_; + $id_ . '/1%2C1%2C1%2CB/request~b' . $id_; //$link = $this->config['Catalog']['url'] . '/record=b' . $id_; return $link; diff --git a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php index de4b629b687..2de7c99c270 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php +++ b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php @@ -91,7 +91,7 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface if (function_exists("sybase_pconnect") && isset($this->config['Catalog']['database']) ) { - putenv("SYBASE=".$this->config['Catalog']['sybpath']); + putenv("SYBASE=" . $this->config['Catalog']['sybpath']); $this->db = sybase_pconnect( $this->config['Catalog']['sybase'], $this->config['Catalog']['username'], @@ -135,8 +135,8 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface $sybid = substr($ppn, 0, -1); //strip checksum $sql = "select o.loan_indication, o.signature, v.loan_status" . " from ous_copy_cache o, volume v" - . " where o.iln=".$this->opaciln - . " and o.ppn=".$sybid + . " where o.iln=" . $this->opaciln + . " and o.ppn=" . $sybid . " and o.epn *= v.epn"; //outer join try { $sqlStmt = sybase_query($sql); @@ -146,7 +146,7 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface $loan_indi = $row[0]; $label = substr($row[1], 4); $locid = substr($row[1], 0, 3); - $location = $this->translate($this->opaciln."/". $locid); + $location = $this->translate($this->opaciln . "/" . $locid); $loan_status = $row[2]; $reserve = 'N'; @@ -228,8 +228,8 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface . ", v.volume_number, o.signature" . ", o.holding, o.type_of_material_copy" . " from ous_copy_cache o, volume v, titles_copy t" - . " where o.iln=".$this->opaciln - . " and o.ppn=".$sybid + . " where o.iln=" . $this->opaciln + . " and o.ppn=" . $sybid . " and o.epn *= v.epn"//outer join . " and t.epn = o.epn" . " and t.iln = o.iln" @@ -252,7 +252,7 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface $callnumber = current(explode(',', substr($row[5], 4))); if ($locid != '') { - $location = $this->opaciln."/". $locid; + $location = $this->opaciln . "/" . $locid; } if ($row[6] != '') { $summary = array($row[6]); @@ -401,7 +401,7 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface protected function getLoanexpire($vol) { $sql = "select expiry_date_loan from loans_requests" - . " where volume_number=".$vol.""; + . " where volume_number=" . $vol . ""; try { $sqlStmt = sybase_query($sql); $result = false; @@ -433,13 +433,13 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface { if (isset($details['item_id'])) { $epn = $details['item_id']; - $hold = $this->opcloan."?MTR=mon" - ."&BES=".$this->opacfno - ."&EPN=".$this->prfz($epn); + $hold = $this->opcloan . "?MTR=mon" + . "&BES=" . $this->opacfno + . "&EPN=" . $this->prfz($epn); return $hold; } - return $this->opcloan."?MTR=mon" ."&BES=".$this->opacfno - ."&EPN=".$this->prfz($id); + return $this->opcloan . "?MTR=mon" . "&BES=" . $this->opacfno + . "&EPN=" . $this->prfz($id); } /** @@ -487,18 +487,18 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface . ",b.iln" . ",b.language_code" . " from borrower b, pincode p" - . " where b.borrower_bar='".$barcode."'" + . " where b.borrower_bar='" . $barcode . "'" . " and b.address_id_nr=p.address_id_nr" - . " and b.iln=".$this->opaciln + . " and b.iln=" . $this->opaciln . " and p.hashnumber = " - . " ascii(substring(convert(char(12),'".$pin."',104),1,1))" - . " + 2*ascii(substring(convert(char(12),'".$pin."',104),2,1))" - . " + 3*ascii(substring(convert(char(12),'".$pin."',104),3,1))" - . " + 4*ascii(substring(convert(char(12),'".$pin."',104),4,1))" - . " + 5*ascii(substring(convert(char(12),'".$pin."',104),5,1))" - . " + 6*ascii(substring(convert(char(12),'".$pin."',104),6,1))" - . " + 7*ascii(substring(convert(char(12),'".$pin."',104),7,1))" - . " + 8*ascii(substring(convert(char(12),'".$pin."',104),8,1))"; + . " ascii(substring(convert(char(12),'" . $pin . "',104),1,1))" + . " + 2*ascii(substring(convert(char(12),'" . $pin . "',104),2,1))" + . " + 3*ascii(substring(convert(char(12),'" . $pin . "',104),3,1))" + . " + 4*ascii(substring(convert(char(12),'" . $pin . "',104),4,1))" + . " + 5*ascii(substring(convert(char(12),'" . $pin . "',104),5,1))" + . " + 6*ascii(substring(convert(char(12),'" . $pin . "',104),6,1))" + . " + 7*ascii(substring(convert(char(12),'" . $pin . "',104),7,1))" + . " + 8*ascii(substring(convert(char(12),'" . $pin . "',104),8,1))"; try { $result = array(); $sqlStmt = sybase_query($sql); @@ -552,7 +552,7 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface . ",a.address_code" . " from borrower b, address a" . " where b.address_id_nr=a.address_id_nr" - . " and b.borrower_bar='".$user['id']."'" + . " and b.borrower_bar='" . $user['id'] . "'" . " order by a.address_code asc"; try { $result = array(); @@ -562,7 +562,7 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface $result = array( 'firstname' => $row[1], 'lastname' => $row[2], - 'address1' => $row[10].', '.$row[9].' '.$row[11], + 'address1' => $row[10] . ', ' . $row[9] . ' ' . $row[11], //'zip' => $row[14], 'email' => $row[3], 'phone' => $row[12], @@ -579,9 +579,9 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface if ($row) { if ($row[8] == $row[13]) { //reminder address first $result['address2'] = $result['address1']; - $result['address1'] = $row[10].', '.$row[9].' '.$row[11]; + $result['address1'] = $row[10] . ', ' . $row[9] . ' ' . $row[11]; } else { - $result['address2'] = $row[10].', '.$row[9].' '.$row[11]; + $result['address2'] = $row[10] . ', ' . $row[9] . ' ' . $row[11]; } } return $result; @@ -610,7 +610,7 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface $aid = $patron['address_id_nr']; $iln = $patron['iln']; $lang = $patron['lang']; - $sql = "exec loans_requests_rm_003 ".$aid.", ".$iln.", ".$lang; + $sql = "exec loans_requests_rm_003 " . $aid . ", " . $iln . ", " . $lang; try { $result = array(); $count = 0; @@ -653,20 +653,20 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface $iln = $patron['iln']; //$lang = $patron['lang']; $sql = "select o.ppn" - .", o.shorttitle" - .", rtrim(convert(char(20),r.reservation_date_time,104))" - .", rtrim(convert(char(20),l.expiry_date_reminder,104))" - .", r.counter_nr_destination" - .", l.no_reminders" - .", l.period_of_loan" - ." from reservation r, loans_requests l, ous_copy_cache o, volume v" - ." where r.address_id_nr=". $aid ."" - ." and l.volume_number=r.volume_number" - ." and v.volume_number=l.volume_number" - ." and v.epn=o.epn" - ." and l.iln=o.iln" - ." and l.iln=".$iln - .""; + . ", o.shorttitle" + . ", rtrim(convert(char(20),r.reservation_date_time,104))" + . ", rtrim(convert(char(20),l.expiry_date_reminder,104))" + . ", r.counter_nr_destination" + . ", l.no_reminders" + . ", l.period_of_loan" + . " from reservation r, loans_requests l, ous_copy_cache o, volume v" + . " where r.address_id_nr=" . $aid . "" + . " and l.volume_number=r.volume_number" + . " and v.volume_number=l.volume_number" + . " and v.epn=o.epn" + . " and l.iln=o.iln" + . " and l.iln=" . $iln + . ""; try { $result = array(); $sqlStmt = sybase_query($sql); @@ -721,30 +721,30 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface $iln = $patron['iln']; //$lang = $patron['lang']; $sql = "select o.ppn" - .", r.costs_code" - .", r.costs" - .", rtrim(convert(char(20),r.date_of_issue,104))" - .", rtrim(convert(char(20),r.date_of_creation,104))" - .", 'Overdue' as fines" - .", o.shorttitle" - ." from requisition r, ous_copy_cache o, volume v" - ." where r.address_id_nr=". $aid ."" - ." and r.iln=".$iln - ." and r.id_number=v.volume_number" - ." and v.epn=o.epn" - ." and r.iln=o.iln" - ." and r.costs_code in (1, 2, 3, 4, 8)" - ." union select id_number" - .", r.costs_code" - .", r.costs" - .", rtrim(convert(char(20),r.date_of_issue,104))" - .", rtrim(convert(char(20),r.date_of_creation,104))" - .", r.extra_information" - .", '' as zero" - ." from requisition r" - ." where r.address_id_nr=". $aid ."" - ." and r.costs_code not in (1, 2, 3, 4, 8)" - .""; + . ", r.costs_code" + . ", r.costs" + . ", rtrim(convert(char(20),r.date_of_issue,104))" + . ", rtrim(convert(char(20),r.date_of_creation,104))" + . ", 'Overdue' as fines" + . ", o.shorttitle" + . " from requisition r, ous_copy_cache o, volume v" + . " where r.address_id_nr=" . $aid . "" + . " and r.iln=" . $iln + . " and r.id_number=v.volume_number" + . " and v.epn=o.epn" + . " and r.iln=o.iln" + . " and r.costs_code in (1, 2, 3, 4, 8)" + . " union select id_number" + . ", r.costs_code" + . ", r.costs" + . ", rtrim(convert(char(20),r.date_of_issue,104))" + . ", rtrim(convert(char(20),r.date_of_creation,104))" + . ", r.extra_information" + . ", '' as zero" + . " from requisition r" + . " where r.address_id_nr=" . $aid . "" + . " and r.costs_code not in (1, 2, 3, 4, 8)" + . ""; try { $result = array(); $sqlStmt = sybase_query($sql); @@ -809,9 +809,9 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface $p = 0; } if ($p == 10) { - $ret = $str."X"; + $ret = $str . "X"; } else { - $ret = $str.$p; + $ret = $str . $p; } return $ret; } diff --git a/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php b/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php index d7ffd0b45ef..33b08413f88 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php +++ b/module/VuFind/src/VuFind/ILS/Driver/NewGenLib.php @@ -222,7 +222,7 @@ class NewGenLib extends AbstractBase while ($row = $sqlStmt->fetch(PDO::FETCH_ASSOC)) { $type = "RECALLED ITEM - Return the item to the library"; $rIdql = "select due_date, ta_date from cir_transaction " . - "where patron_id='" . $row['patron_id']."'"; + "where patron_id='" . $row['patron_id'] . "'"; try { $sqlStmt2 = $this->db->prepare($rIdql); $sqlStmt2->execute(); diff --git a/module/VuFind/src/VuFind/ILS/Driver/PICA.php b/module/VuFind/src/VuFind/ILS/Driver/PICA.php index 3abafc093e2..bd9ed06be56 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/PICA.php +++ b/module/VuFind/src/VuFind/ILS/Driver/PICA.php @@ -259,7 +259,7 @@ class PICA extends DAIA $expiration[] = substr($postit, $position_expire+24, 10); $renewals[] = $this->getRenewals($completeValue); $closing_title = strpos($postit, '</td>', $position_title); - $titles[] = $completeValue." ".substr( + $titles[] = $completeValue . " " . substr( $postit, $position_title+24, ($closing_title-$position_title-24) ); @@ -532,7 +532,7 @@ class PICA extends DAIA } else { $checksum = 11 - $checksum%11; } - $ppns[] = $value.$checksum; + $ppns[] = $value . $checksum; $position = $pos + 1; $position_create = $position; for ($n = 0; $n<3; $n++) { @@ -630,7 +630,7 @@ class PICA extends DAIA // Parameter verarbeiten foreach ($data_to_send as $key => $dat) { $data_to_send[$key] - = "$key=".rawurlencode(utf8_encode(stripslashes($dat))); + = "$key=" . rawurlencode(utf8_encode(stripslashes($dat))); } $postData = implode("&", $data_to_send); @@ -638,8 +638,8 @@ class PICA extends DAIA $out = "POST $file HTTP/1.1\r\n"; $out .= "Host: " . $this->catalogHost . "\r\n"; $out .= "Content-type: application/x-www-form-urlencoded\r\n"; - $out .= "Content-length: ". strlen($postData) ."\r\n"; - $out .= "User-Agent: ".$_SERVER["HTTP_USER_AGENT"]."\r\n"; + $out .= "Content-length: " . strlen($postData) . "\r\n"; + $out .= "User-Agent: " . $_SERVER["HTTP_USER_AGENT"] . "\r\n"; $out .= "Connection: Close\r\n"; $out .= "\r\n"; $out .= $postData; diff --git a/module/VuFind/src/VuFind/ILS/Driver/Polaris.php b/module/VuFind/src/VuFind/ILS/Driver/Polaris.php index bc5e09fe708..4b1aae0f97f 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Polaris.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Polaris.php @@ -126,7 +126,7 @@ class Polaris extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf $url = $this->ws_host . $this->ws_app . $api_query; - $signature_text = $http_method.$url.$date.$patronpassword; + $signature_text = $http_method . $url . $date . $patronpassword; $signature = base64_encode( hash_hmac('sha1', $signature_text, $this->ws_api_key, true) ); @@ -343,7 +343,7 @@ class Polaris extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf // all activations are for now(), for now. // microtime is msec or sec?? seems to have changed - $activationdate = '/Date(' . intval(microtime(true) * 1000) .')/'; + $activationdate = '/Date(' . intval(microtime(true) * 1000) . ')/'; $jsonrequest = array( 'PatronID' => $holdDetails['patron']['id'], diff --git a/module/VuFind/src/VuFind/ILS/Driver/Sierra.php b/module/VuFind/src/VuFind/ILS/Driver/Sierra.php index 9fd27ba8daf..4d2eda3117a 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Sierra.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Sierra.php @@ -255,10 +255,10 @@ class Sierra extends AbstractBase while ($row = pg_fetch_row($results)) { if ($instructors[$row[2]] != null) { $fakeId = $row[2] . "-" . $j; - $instructors[$fakeId] = $row[0] . " (" . $row[1]. ")"; + $instructors[$fakeId] = $row[0] . " (" . $row[1] . ")"; $j++; } else { - $instructors[$row[2]] = $row[0] . " (" . $row[1]. ")"; + $instructors[$row[2]] = $row[0] . " (" . $row[1] . ")"; } } return $instructors; diff --git a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php index a1d46c21eea..9757a6d7fd2 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php @@ -149,7 +149,7 @@ class Symphony extends AbstractBase if (!isset($soapClients[$service])) { try { $soapClients[$service] = new SoapClient( - $this->config['WebServices']['baseURL']."/soap/$service?wsdl", + $this->config['WebServices']['baseURL'] . "/soap/$service?wsdl", $this->config['WebServices']['soapOptions'] ); } catch (SoapFault $e) { diff --git a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php index 1dacb87a588..7cb278b9bea 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Unicorn.php @@ -1230,8 +1230,8 @@ class Unicorn extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf { if (strlen($date) >= 8) { // format is MM/DD/YYYY HH:MI so it can be passed to strtotime - $formatted_date = substr($date, 4, 2).'/'.substr($date, 6, 2). - '/'.substr($date, 0, 4); + $formatted_date = substr($date, 4, 2) . '/' . substr($date, 6, 2) . + '/' . substr($date, 0, 4); if (strlen($date) > 8) { $formatted_date .= ' ' . substr($date, 8, 2) . ':' . substr($date, 10); @@ -1387,7 +1387,7 @@ class Unicorn extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf if (strpos('68x', $subfield->getCode()) !== false) { continue; } - $decoded_holding .= ' '. $subfield->getData(); + $decoded_holding .= ' ' . $subfield->getData(); } $ndx = (int) ($linking @@ -1398,7 +1398,7 @@ class Unicorn extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf foreach ($textuals as $linking => $field) { $textual_holding = $field->getSubfield('a')->getData(); foreach ($field->getSubfields('z') as $note) { - $textual_holding .= ' '. $note->getData(); + $textual_holding .= ' ' . $note->getData(); } $ndx = (int) ($linking . sprintf("%0{$link_digits}u", 0)); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Virtua.php b/module/VuFind/src/VuFind/ILS/Driver/Virtua.php index 3c35b571da3..f83f4993d67 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Virtua.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Virtua.php @@ -700,15 +700,15 @@ class Virtua extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterfa break; // Year only case "(year)": - return $data['data'][0]." "; + return $data['data'][0] . " "; break; // Year + Month case "(year)(month)": $months = explode("-", $data['data'][1]); $m = count($months); $years = explode("-", $data['data'][0]); $y = count($years); - $my = $m.$y; + $my = $m . $y; - $start_time = strtotime("01-".$months[0]."-".$years[0]); + $start_time = strtotime("01-" . $months[0] . "-" . $years[0]); $end_string = "F Y"; switch ($my) { @@ -734,7 +734,7 @@ class Virtua extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterfa break; } if ($end_time != null) { - return date($start_string, $start_time)." - ". + return date($start_string, $start_time) . " - " . date($end_string, $end_time); } else { return date($start_string, $start_time); @@ -745,9 +745,9 @@ class Virtua extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterfa $days = explode("-", $data['data'][2]); $d = count($days); $months = explode("-", $data['data'][1]); $m = count($months); $years = explode("-", $data['data'][0]); $y = count($years); - $dmy = $d.$m.$y; + $dmy = $d . $m . $y; - $start_time = strtotime($days[0]."-".$months[0]."-".$years[0]); + $start_time = strtotime($days[0] . "-" . $months[0] . "-" . $years[0]); $end_string = "jS F Y"; switch ($dmy) { @@ -807,7 +807,7 @@ class Virtua extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterfa break; } if ($end_time != null) { - return date($start_string, $start_time)." - ". + return date($start_string, $start_time) . " - " . date($end_string, $end_time); } else { return date($start_string, $start_time); @@ -1000,7 +1000,7 @@ class Virtua extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterfa } } - $sort_set[$sort_rule.".".$sort_order] = array( + $sort_set[$sort_rule . "." . $sort_order] = array( 'tag' => $tag, 'data' => $data ); @@ -1105,7 +1105,7 @@ class Virtua extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterfa if ($row['SUBFIELD_DATA'] != null && trim($row['SUBFIELD_DATA']) != "" ) { - $data_set[$row['ID']."_".$row['FIELD_SEQUENCE']][] = array( + $data_set[$row['ID'] . "_" . $row['FIELD_SEQUENCE']][] = array( 'id' => trim($row['ID']), 'code' => trim($row['SUBFIELD_CODE']), 'data' => trim($row['SUBFIELD_DATA']) @@ -1771,24 +1771,24 @@ class Virtua extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterfa // Have to use raw post data because of the way // virtua expects the barcodes to come across. - $post_data = "function=" ."RENEWAL"; - $post_data .= "&search=" ."PATRON"; - $post_data .= "&sessionid=" ."$session_id"; - $post_data .= "&skin=" ."homepage"; - $post_data .= "&lng=" ."en"; - $post_data .= "&inst=" ."consortium"; - $post_data .= "&conf=" .urlencode("./chameleon.conf"); - $post_data .= "&u1=" ."12"; - $post_data .= "&SourceScreen=" ."PATRONACTIVITY"; - $post_data .= "&pos=" ."1"; - $post_data .= "&patronid=" .$patron['cat_username']; + $post_data = "function=" . "RENEWAL"; + $post_data .= "&search=" . "PATRON"; + $post_data .= "&sessionid=" . "$session_id"; + $post_data .= "&skin=" . "homepage"; + $post_data .= "&lng=" . "en"; + $post_data .= "&inst=" . "consortium"; + $post_data .= "&conf=" . urlencode("./chameleon.conf"); + $post_data .= "&u1=" . "12"; + $post_data .= "&SourceScreen=" . "PATRONACTIVITY"; + $post_data .= "&pos=" . "1"; + $post_data .= "&patronid=" . $patron['cat_username']; $post_data .= "&patronhost=" . urlencode($this->config['Catalog']['patron_host']); $post_data .= "&host=" . urlencode($this->config['Catalog']['host_string']); - $post_data .= "&itembarcode=" .implode("&itembarcode=", $item_list); - $post_data .= "&submit=" ."Renew"; - $post_data .= "&reset=" ."Clear"; + $post_data .= "&itembarcode=" . implode("&itembarcode=", $item_list); + $post_data .= "&submit=" . "Renew"; + $post_data .= "&reset=" . "Clear"; $result = $this->httpRequest($virtua_url, null, $post_data); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php index 38a06769a09..5b3004f54df 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Voyager.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Voyager.php @@ -342,11 +342,11 @@ class Voyager extends AbstractBase // From $sqlFrom = array( - $this->dbName.".BIB_ITEM", $this->dbName.".ITEM", - $this->dbName.".ITEM_STATUS_TYPE", - $this->dbName.".ITEM_STATUS", - $this->dbName.".LOCATION", $this->dbName.".MFHD_ITEM", - $this->dbName.".MFHD_MASTER" + $this->dbName . ".BIB_ITEM", $this->dbName . ".ITEM", + $this->dbName . ".ITEM_STATUS_TYPE", + $this->dbName . ".ITEM_STATUS", + $this->dbName . ".LOCATION", $this->dbName . ".MFHD_ITEM", + $this->dbName . ".MFHD_MASTER" ); // Where @@ -399,8 +399,8 @@ class Voyager extends AbstractBase // From $sqlFrom = array( - $this->dbName.".BIB_MFHD", $this->dbName.".LOCATION", - $this->dbName.".MFHD_MASTER" + $this->dbName . ".BIB_MFHD", $this->dbName . ".LOCATION", + $this->dbName . ".MFHD_MASTER" ); // Where @@ -603,13 +603,13 @@ class Voyager extends AbstractBase // From $sqlFrom = array( - $this->dbName.".BIB_ITEM", $this->dbName.".ITEM", - $this->dbName.".ITEM_STATUS_TYPE", - $this->dbName.".ITEM_STATUS", - $this->dbName.".LOCATION", $this->dbName.".MFHD_ITEM", - $this->dbName.".MFHD_MASTER", $this->dbName.".MFHD_DATA", - $this->dbName.".CIRC_TRANSACTIONS", - $this->dbName.".ITEM_BARCODE" + $this->dbName . ".BIB_ITEM", $this->dbName . ".ITEM", + $this->dbName . ".ITEM_STATUS_TYPE", + $this->dbName . ".ITEM_STATUS", + $this->dbName . ".LOCATION", $this->dbName . ".MFHD_ITEM", + $this->dbName . ".MFHD_MASTER", $this->dbName . ".MFHD_DATA", + $this->dbName . ".CIRC_TRANSACTIONS", + $this->dbName . ".ITEM_BARCODE" ); // Where @@ -673,8 +673,8 @@ class Voyager extends AbstractBase // From $sqlFrom = array( - $this->dbName.".BIB_MFHD", $this->dbName.".LOCATION", - $this->dbName.".MFHD_MASTER", $this->dbName.".MFHD_DATA" + $this->dbName . ".BIB_MFHD", $this->dbName . ".LOCATION", + $this->dbName . ".MFHD_MASTER", $this->dbName . ".MFHD_DATA" ); // Where @@ -770,8 +770,8 @@ class Voyager extends AbstractBase protected function getPurchaseHistoryData($id) { $sql = "select LINE_ITEM_COPY_STATUS.MFHD_ID, SERIAL_ISSUES.ENUMCHRON " . - "from $this->dbName.SERIAL_ISSUES, $this->dbName.COMPONENT, ". - "$this->dbName.ISSUES_RECEIVED, $this->dbName.SUBSCRIPTION, ". + "from $this->dbName.SERIAL_ISSUES, $this->dbName.COMPONENT, " . + "$this->dbName.ISSUES_RECEIVED, $this->dbName.SUBSCRIPTION, " . "$this->dbName.LINE_ITEM, $this->dbName.LINE_ITEM_COPY_STATUS " . "where SERIAL_ISSUES.COMPONENT_ID = COMPONENT.COMPONENT_ID " . "and ISSUES_RECEIVED.ISSUE_ID = SERIAL_ISSUES.ISSUE_ID " . @@ -1260,12 +1260,12 @@ class Voyager extends AbstractBase // From $sqlFrom = array( - $this->dbName.".CIRC_TRANSACTIONS", - $this->dbName.".BIB_ITEM", - $this->dbName.".MFHD_ITEM", - $this->dbName.".BIB_TEXT", - $this->dbName.".CIRC_POLICY_MATRIX", - $this->dbName.".LOCATION" + $this->dbName . ".CIRC_TRANSACTIONS", + $this->dbName . ".BIB_ITEM", + $this->dbName . ".MFHD_ITEM", + $this->dbName . ".BIB_TEXT", + $this->dbName . ".CIRC_POLICY_MATRIX", + $this->dbName . ".LOCATION" ); // Where @@ -1408,8 +1408,8 @@ class Voyager extends AbstractBase // From $sqlFrom = array( - $this->dbName.".FINE_FEE", $this->dbName.".FINE_FEE_TYPE", - $this->dbName.".PATRON", $this->dbName.".BIB_ITEM" + $this->dbName . ".FINE_FEE", $this->dbName . ".FINE_FEE_TYPE", + $this->dbName . ".PATRON", $this->dbName . ".BIB_ITEM" ); // Where @@ -1539,12 +1539,12 @@ class Voyager extends AbstractBase // From $sqlFrom = array( - $this->dbName.".HOLD_RECALL", - $this->dbName.".HOLD_RECALL_ITEMS", - $this->dbName.".MFHD_ITEM", - $this->dbName.".BIB_TEXT", - $this->dbName.".VOYAGER_DATABASES", - $this->dbName.".REQUEST_GROUP" + $this->dbName . ".HOLD_RECALL", + $this->dbName . ".HOLD_RECALL_ITEMS", + $this->dbName . ".MFHD_ITEM", + $this->dbName . ".BIB_TEXT", + $this->dbName . ".VOYAGER_DATABASES", + $this->dbName . ".REQUEST_GROUP" ); // Where @@ -1721,10 +1721,10 @@ class Voyager extends AbstractBase // From $sqlFrom = array( - $this->dbName.'.CALL_SLIP', - $this->dbName.'.CALL_SLIP_STATUS_TYPE', - $this->dbName.'.MFHD_ITEM', - $this->dbName.'.BIB_TEXT' + $this->dbName . '.CALL_SLIP', + $this->dbName . '.CALL_SLIP_STATUS_TYPE', + $this->dbName . '.MFHD_ITEM', + $this->dbName . '.BIB_TEXT' ); // Where @@ -1854,10 +1854,10 @@ class Voyager extends AbstractBase { $sql = "SELECT PATRON.LAST_NAME, PATRON.FIRST_NAME, " . "PATRON.HISTORICAL_CHARGES, PATRON_ADDRESS.ADDRESS_LINE1, " . - "PATRON_ADDRESS.ADDRESS_LINE2, PATRON_ADDRESS.ZIP_POSTAL, ". + "PATRON_ADDRESS.ADDRESS_LINE2, PATRON_ADDRESS.ZIP_POSTAL, " . "PATRON_ADDRESS.CITY, PATRON_ADDRESS.COUNTRY, " . "PATRON_PHONE.PHONE_NUMBER, PATRON_GROUP.PATRON_GROUP_NAME " . - "FROM $this->dbName.PATRON, $this->dbName.PATRON_ADDRESS, ". + "FROM $this->dbName.PATRON, $this->dbName.PATRON_ADDRESS, " . "$this->dbName.PATRON_PHONE, $this->dbName.PATRON_BARCODE, " . "$this->dbName.PATRON_GROUP " . "WHERE PATRON.PATRON_ID = PATRON_ADDRESS.PATRON_ID (+) " . @@ -2294,7 +2294,7 @@ class Voyager extends AbstractBase " JOIN $this->dbName.MFHD_MASTER " . " ON BIB_MFHD.MFHD_ID = MFHD_MASTER.MFHD_ID" . " JOIN " . - " ( ". + " ( " . " ((select distinct eitem.mfhd_id, subsubquery1.COURSE_ID, " . " subsubquery1.INSTRUCTOR_ID, subsubquery1.DEPARTMENT_ID " . " from $this->dbName.eitem join " . diff --git a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php index 7aa6e4a814a..952b2141e83 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php +++ b/module/VuFind/src/VuFind/ILS/Driver/VoyagerRestful.php @@ -731,7 +731,7 @@ class VoyagerRestful extends Voyager implements \VuFindHttp\HttpServiceAwareInte "as location_name from " . $this->dbName . ".CIRC_POLICY_LOCS, $this->dbName.LOCATION, " . "$this->dbName.REQUEST_GROUP_LOCATION rgl " . - "where CIRC_POLICY_LOCS.PICKUP_LOCATION = 'Y' ". + "where CIRC_POLICY_LOCS.PICKUP_LOCATION = 'Y' " . "and CIRC_POLICY_LOCS.LOCATION_ID = LOCATION.LOCATION_ID " . "and rgl.GROUP_ID=:requestGroupId " . "and rgl.LOCATION_ID = LOCATION.LOCATION_ID"; @@ -741,7 +741,7 @@ class VoyagerRestful extends Voyager implements \VuFindHttp\HttpServiceAwareInte "NVL(LOCATION.LOCATION_DISPLAY_NAME, LOCATION.LOCATION_NAME) " . "as location_name from " . $this->dbName . ".CIRC_POLICY_LOCS, $this->dbName.LOCATION " . - "where CIRC_POLICY_LOCS.PICKUP_LOCATION = 'Y' ". + "where CIRC_POLICY_LOCS.PICKUP_LOCATION = 'Y' " . "and CIRC_POLICY_LOCS.LOCATION_ID = LOCATION.LOCATION_ID"; } @@ -1051,7 +1051,7 @@ class VoyagerRestful extends Voyager implements \VuFindHttp\HttpServiceAwareInte // Add Params $queryString = array(); foreach ($params as $key => $param) { - $queryString[] = urlencode($key). "=" . urlencode($param); + $queryString[] = urlencode($key) . "=" . urlencode($param); } // Build Hierarchy @@ -1997,7 +1997,7 @@ EOT; */ public function getCancelHoldDetails($holdDetails) { - $cancelDetails = $holdDetails['item_id']."|".$holdDetails['reqnum']; + $cancelDetails = $holdDetails['item_id'] . "|" . $holdDetails['reqnum']; return $cancelDetails; } diff --git a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php index 79603a8bfe0..fde80f5179a 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php +++ b/module/VuFind/src/VuFind/ILS/Driver/XCNCIP2.php @@ -1326,7 +1326,7 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf */ public function getCancelHoldDetails($holdDetails) { - $cancelDetails = $holdDetails['id']."|".$holdDetails['requestId']; + $cancelDetails = $holdDetails['id'] . "|" . $holdDetails['requestId']; return $cancelDetails; } @@ -1357,7 +1357,7 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf ); $cancelRequestResponse = $this->sendRequest($request); $userId = $cancelRequestResponse->xpath( - 'ns1:CancelRequestItemResponse/'. + 'ns1:CancelRequestItemResponse/' . 'ns1:UserId/ns1:UserIdentifierValue' ); $itemId = (string)$itemId; @@ -1392,7 +1392,7 @@ class XCNCIP2 extends AbstractBase implements \VuFindHttp\HttpServiceAwareInterf */ public function getCancelStorageRetrievalRequestDetails($callslipDetails) { - $cancelDetails = $callslipDetails['id']."|".$callslipDetails['requestId']; + $cancelDetails = $callslipDetails['id'] . "|" . $callslipDetails['requestId']; return $cancelDetails; } diff --git a/module/VuFind/src/VuFind/ILS/Logic/Holds.php b/module/VuFind/src/VuFind/ILS/Logic/Holds.php index d939131f186..60475226280 100644 --- a/module/VuFind/src/VuFind/ILS/Logic/Holds.php +++ b/module/VuFind/src/VuFind/ILS/Logic/Holds.php @@ -478,7 +478,7 @@ class Holds foreach ($details as $key => $param) { $needle = in_array($key, $HMACKeys); if ($needle) { - $queryString[] = $key. "=" .urlencode($param); + $queryString[] = $key . "=" . urlencode($param); } } diff --git a/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php b/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php index 7b3ef7765c1..13d88fc789a 100644 --- a/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php +++ b/module/VuFind/src/VuFind/ILS/Logic/TitleHolds.php @@ -281,7 +281,7 @@ class TitleHolds foreach ($data as $key => $param) { $needle = in_array($key, $HMACKeys); if ($needle) { - $queryString[] = $key. '=' .urlencode($param); + $queryString[] = $key . '=' . urlencode($param); } } diff --git a/module/VuFind/src/VuFind/Log/Logger.php b/module/VuFind/src/VuFind/Log/Logger.php index b5d648e5e3f..a4be9654c76 100644 --- a/module/VuFind/src/VuFind/Log/Logger.php +++ b/module/VuFind/src/VuFind/Log/Logger.php @@ -288,7 +288,7 @@ class Logger extends BaseLogger implements ServiceLocatorAwareInterface } $basicBacktraceLine = $detailedBacktraceLine = $line['file'] . ' line ' . $line['line'] . ' - ' . - (isset($line['class'])? 'class = '.$line['class'].', ' : '') + (isset($line['class'])? 'class = ' . $line['class'] . ', ' : '') . 'function = ' . $line['function']; $basicBacktrace .= "{$basicBacktraceLine}\n"; if (!empty($line['args'])) { diff --git a/module/VuFind/src/VuFind/Recommend/DPLATerms.php b/module/VuFind/src/VuFind/Recommend/DPLATerms.php index 334d848640e..94d309e6d4c 100644 --- a/module/VuFind/src/VuFind/Recommend/DPLATerms.php +++ b/module/VuFind/src/VuFind/Recommend/DPLATerms.php @@ -225,7 +225,7 @@ class DPLATerms implements RecommendInterface 'provider' => is_array($doc->dataProvider) ? current($doc->dataProvider) : $doc->dataProvider, - 'link' => 'http://dp.la/item/'.$doc->id + 'link' => 'http://dp.la/item/' . $doc->id ); if (isset($doc->$desc)) { $results[$i]['desc'] = is_array($doc->$desc) diff --git a/module/VuFind/src/VuFind/Recommend/SideFacets.php b/module/VuFind/src/VuFind/Recommend/SideFacets.php index 288fcfb91b9..b4e43c270ee 100644 --- a/module/VuFind/src/VuFind/Recommend/SideFacets.php +++ b/module/VuFind/src/VuFind/Recommend/SideFacets.php @@ -242,7 +242,7 @@ class SideFacets extends AbstractFacets if (isset($facetSet[$hierarchicalFacet])) { if (!$this->hierarchicalFacetHelper) { throw new \Exception( - get_class($this). ': hierarchical facet helper unavailable' + get_class($this) . ': hierarchical facet helper unavailable' ); } diff --git a/module/VuFind/src/VuFind/RecordDriver/EDS.php b/module/VuFind/src/VuFind/RecordDriver/EDS.php index 5d4077c899d..ad817158548 100644 --- a/module/VuFind/src/VuFind/RecordDriver/EDS.php +++ b/module/VuFind/src/VuFind/RecordDriver/EDS.php @@ -49,7 +49,7 @@ class EDS extends SolrDefault { $dbid = $this->fields['Header']['DbId']; $an = $this->fields['Header']['An']; - return $dbid.','.$an; + return $dbid . ',' . $an; } /** @@ -64,7 +64,7 @@ class EDS extends SolrDefault return ''; } if (mb_strlen($title, 'UTF-8') > 20) { - $title = mb_substr($title, 0, 17, 'UTF-8').'...'; + $title = mb_substr($title, 0, 17, 'UTF-8') . '...'; } return $title; } diff --git a/module/VuFind/src/VuFind/Search/EDS/Options.php b/module/VuFind/src/VuFind/Search/EDS/Options.php index d8d2544b773..089543e4f73 100644 --- a/module/VuFind/src/VuFind/Search/EDS/Options.php +++ b/module/VuFind/src/VuFind/Search/EDS/Options.php @@ -386,7 +386,7 @@ class Options extends \VuFind\Search\Base\Options //View preferences if (isset($searchSettings->General->default_view)) { - $this->defaultView = 'list|'.$searchSettings->General->default_view; + $this->defaultView = 'list|' . $searchSettings->General->default_view; } @@ -616,7 +616,7 @@ class Options extends \VuFind\Search\Base\Options foreach ($this->commonLimiters as $key) { $limiter = $this->limiterOptions[$key] ; $ssLimiterOptions[$key] = array( - 'selectedvalue' => 'LIMIT|'.$key.':y', + 'selectedvalue' => 'LIMIT|' . $key . ':y', 'description' => $this->getLabelForCheckboxFilter( 'eds_limiter_' . $key, $limiter['Label'] ), @@ -639,7 +639,7 @@ class Options extends \VuFind\Search\Base\Options foreach ($this->commonExpanders as $key) { $expander = $this->expanderOptions[$key]; $ssExpanderOptions[$key] = array( - 'selectedvalue' => 'EXPAND:'.$key, + 'selectedvalue' => 'EXPAND:' . $key, 'description' => $this->getLabelForCheckboxFilter( 'eds_expander_' . $key, $expander['Label'] ), @@ -694,7 +694,7 @@ class Options extends \VuFind\Search\Base\Options //expanders $expanders = $this->getDefaultExpanders(); foreach ($expanders as $expander) { - $this->defaultFilters[] = 'EXPAND:'.$expander; + $this->defaultFilters[] = 'EXPAND:' . $expander; } //limiters @@ -704,7 +704,7 @@ class Options extends \VuFind\Search\Base\Options // only select limiters can be defaulted on limiters can be // defaulted $val = $value['LimiterValues'][0]['Value']; - $this->defaultFilters[] = 'LIMIT|'.$key.':'.$val; + $this->defaultFilters[] = 'LIMIT|' . $key . ':' . $val; } } } diff --git a/module/VuFind/src/VuFind/Search/EDS/Params.php b/module/VuFind/src/VuFind/Search/EDS/Params.php index 529befa4d3e..f00d4ea8ab5 100644 --- a/module/VuFind/src/VuFind/Search/EDS/Params.php +++ b/module/VuFind/src/VuFind/Search/EDS/Params.php @@ -218,12 +218,12 @@ class Params extends \VuFind\Search\Base\Params list($key, $value) = explode(':', $limiter, 2); $value = SearchRequestModel::escapeSpecialCharacters($value); $edsLimiters[$key] = (!isset($edsLimiters[$key])) - ? $value : $edsLimiters[$key].','.$value; + ? $value : $edsLimiters[$key] . ',' . $value; } } if (!empty($edsLimiters)) { foreach ($edsLimiters as $key => $value) { - $params->add('limiters', $key.':'.$value); + $params->add('limiters', $key . ':' . $value); } } } @@ -245,7 +245,7 @@ class Params extends \VuFind\Search\Base\Params $value = ''; foreach ($this->expanders as $expander) { $value = (!empty($value)) - ? $value.','.$expander : $expander; + ? $value . ',' . $expander : $expander; } if (!empty($value)) { $params->add('expander', $value); @@ -397,7 +397,7 @@ class Params extends \VuFind\Search\Base\Params foreach ($this->getOptions()->getViewOptions() as $key => $value) { $list[$key] = array( 'desc' => $value, - 'selected' => ($key == $this->getView().'|'.$this->getEdsView()) + 'selected' => ($key == $this->getView() . '|' . $this->getEdsView()) ); } return $list; diff --git a/module/VuFind/src/VuFind/Search/Favorites/Results.php b/module/VuFind/src/VuFind/Search/Favorites/Results.php index f2c4886bc99..ee48d5735a1 100644 --- a/module/VuFind/src/VuFind/Search/Favorites/Results.php +++ b/module/VuFind/src/VuFind/Search/Favorites/Results.php @@ -98,7 +98,7 @@ class Results extends BaseResults 'displayText' => $tag->tag, 'count' => $tag->cnt, 'isApplied' => - $this->getParams()->hasFilter("$field:".$tag->tag) + $this->getParams()->hasFilter("$field:" . $tag->tag) ); } break; diff --git a/module/VuFind/src/VuFind/Search/Pazpar2/Params.php b/module/VuFind/src/VuFind/Search/Pazpar2/Params.php index 8ae480e7c82..80abd35e041 100644 --- a/module/VuFind/src/VuFind/Search/Pazpar2/Params.php +++ b/module/VuFind/src/VuFind/Search/Pazpar2/Params.php @@ -55,7 +55,7 @@ class Params extends \VuFind\Search\Base\Params foreach ($sources as $i => $current) { $sources[$i] = $allShards[$current]; } - $backendParams->set('filter', 'pz:id='.implode('|', $sources)); + $backendParams->set('filter', 'pz:id=' . implode('|', $sources)); } return $backendParams; diff --git a/module/VuFind/src/VuFind/Search/Primo/Results.php b/module/VuFind/src/VuFind/Search/Primo/Results.php index 6b981e0df78..8ed5ff2a951 100644 --- a/module/VuFind/src/VuFind/Search/Primo/Results.php +++ b/module/VuFind/src/VuFind/Search/Primo/Results.php @@ -95,7 +95,7 @@ class Results extends \VuFind\Search\Base\Results ? $this->translate($value) : $this->getParams()->fixPrimoFacetValue($value), 'isApplied' => - $this->getParams()->hasFilter("$field:".$value), + $this->getParams()->hasFilter("$field:" . $value), 'operator' => 'AND', 'count' => $count ); } diff --git a/module/VuFind/src/VuFind/Search/Solr/Params.php b/module/VuFind/src/VuFind/Search/Solr/Params.php index f63adb426cc..19c21557354 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Params.php +++ b/module/VuFind/src/VuFind/Search/Solr/Params.php @@ -112,9 +112,9 @@ class Params extends \VuFind\Search\Base\Params if (substr($value, -1) == '*' || preg_match('/\[[^\]]+\s+TO\s+[^\]]+\]/', $value) ) { - $q = $field.':'.$value; + $q = $field . ':' . $value; } else { - $q = $field.':"'.addcslashes($value, '"\\').'"'; + $q = $field . ':"' . addcslashes($value, '"\\') . '"'; } if ($orFacet) { $orFilters[$field] = isset($orFilters[$field]) diff --git a/module/VuFind/src/VuFind/Search/Solr/Results.php b/module/VuFind/src/VuFind/Search/Solr/Results.php index 97a47ba588f..d39d6901619 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Results.php +++ b/module/VuFind/src/VuFind/Search/Solr/Results.php @@ -266,8 +266,8 @@ class Results extends \VuFind\Search\Base\Results $currentSettings['operator'] = $this->getParams()->getFacetOperator($field); $currentSettings['isApplied'] - = $this->getParams()->hasFilter("$field:".$value) - || $this->getParams()->hasFilter("~$field:".$value); + = $this->getParams()->hasFilter("$field:" . $value) + || $this->getParams()->hasFilter("~$field:" . $value); // Store the collected values: $list[$field]['list'][] = $currentSettings; diff --git a/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php b/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php index ca382af230f..34d55b60507 100644 --- a/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php +++ b/module/VuFind/src/VuFind/Search/Solr/SpellingProcessor.php @@ -140,7 +140,7 @@ class SpellingProcessor while ($token !== false) { // find double quoted tokens if (substr($token, 0, 1) == '"' && substr($token, -1) != '"') { - $token .= ' '.strtok('"').'"'; + $token .= ' ' . strtok('"') . '"'; } // skip boolean operators if (!in_array($token, $joins)) { diff --git a/module/VuFind/src/VuFind/Search/UrlQueryHelper.php b/module/VuFind/src/VuFind/Search/UrlQueryHelper.php index 4c777070aed..ff6b5869f4d 100644 --- a/module/VuFind/src/VuFind/Search/UrlQueryHelper.php +++ b/module/VuFind/src/VuFind/Search/UrlQueryHelper.php @@ -159,7 +159,7 @@ class UrlQueryHelper if (!isset($params['type' . $i])) { $params['type' . $i] = array(); } - $params['lookfor'.$i][] = $inner->getString(); + $params['lookfor' . $i][] = $inner->getString(); $params['type' . $i][] = $inner->getHandler(); if (null !== ($op = $inner->getOperator())) { $params['op' . $i][] = $op; diff --git a/module/VuFind/src/VuFind/SimpleXML.php b/module/VuFind/src/VuFind/SimpleXML.php index a9286db7e57..d166f01b52f 100644 --- a/module/VuFind/src/VuFind/SimpleXML.php +++ b/module/VuFind/src/VuFind/SimpleXML.php @@ -54,7 +54,7 @@ class SimpleXML ? $child->asXML() : $child; // strip off xml header - $mark = strpos($xml, '?'.'>'); + $mark = strpos($xml, '?' . '>'); if ($mark>0 && $mark<40) { $xml = substr($xml, $mark + 2); } diff --git a/module/VuFind/src/VuFind/Sitemap/Generator.php b/module/VuFind/src/VuFind/Sitemap/Generator.php index 081101ed91c..e1411d524b2 100644 --- a/module/VuFind/src/VuFind/Sitemap/Generator.php +++ b/module/VuFind/src/VuFind/Sitemap/Generator.php @@ -145,7 +145,7 @@ class Generator } if (isset($this->config->SitemapIndex->indexFileName)) { $this->indexFile = $this->config->Sitemap->fileLocation . '/' . - $this->config->SitemapIndex->indexFileName. '.xml'; + $this->config->SitemapIndex->indexFileName . '.xml'; } } @@ -210,7 +210,7 @@ class Generator foreach ($ids as $item) { $loc = htmlspecialchars($recordUrl . urlencode($item)); if (strpos($loc, 'http') === false) { - $loc = 'http://'.$loc; + $loc = 'http://' . $loc; } $smf->addUrl($loc); $lastTerm = $item; diff --git a/module/VuFind/src/VuFind/Sitemap/Sitemap.php b/module/VuFind/src/VuFind/Sitemap/Sitemap.php index 57a3cf08a0b..850e6cc6531 100644 --- a/module/VuFind/src/VuFind/Sitemap/Sitemap.php +++ b/module/VuFind/src/VuFind/Sitemap/Sitemap.php @@ -69,7 +69,7 @@ class Sitemap extends AbstractFile $freq = htmlspecialchars($this->frequency); return '<url>' . "\n" . ' <loc>' . $loc . '</loc>' . "\n" - . ' <changefreq>'. $freq . '</changefreq>'."\n" + . ' <changefreq>' . $freq . '</changefreq>' . "\n" . '</url>' . "\n"; } } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Statistics/Driver/File.php b/module/VuFind/src/VuFind/Statistics/Driver/File.php index f1dd79ce24e..ef68d5acf95 100644 --- a/module/VuFind/src/VuFind/Statistics/Driver/File.php +++ b/module/VuFind/src/VuFind/Statistics/Driver/File.php @@ -109,7 +109,7 @@ class File extends AbstractBase */ protected function getSaveXML($data, $tab = 0) { - $xml = str_repeat("\t", $tab)."<doc>\n"; + $xml = str_repeat("\t", $tab) . "<doc>\n"; $tab++; foreach ($data as $tag => $value) { $xml .= str_repeat("\t", $tab); @@ -118,7 +118,7 @@ class File extends AbstractBase ? 'true' : 'false' : $value; - $xml .= '<field name="'.$tag.'">'.$insert."</field>\n"; + $xml .= '<field name="' . $tag . '">' . $insert . "</field>\n"; } $tab--; return $xml . str_repeat("\t", $tab) . "</doc>"; diff --git a/module/VuFind/src/VuFind/Statistics/Driver/Solr.php b/module/VuFind/src/VuFind/Statistics/Driver/Solr.php index fd9dafc012b..e9ba0d980de 100644 --- a/module/VuFind/src/VuFind/Statistics/Driver/Solr.php +++ b/module/VuFind/src/VuFind/Statistics/Driver/Solr.php @@ -100,7 +100,7 @@ class Solr extends AbstractBase */ public function getFullList($field, $value = array('value' => '[* TO *]')) { - $query = new Query($field.':'.$value['value']); + $query = new Query($field . ':' . $value['value']); $params = new ParamBag(); $params->add('fl', $field); $start = 0; @@ -142,7 +142,7 @@ class Solr extends AbstractBase if ($version) { // Version specific $browser = $group['doclist']['docs'][0]['browser'] - .' '.$group['doclist']['docs'][0]['browserVersion']; + . ' ' . $group['doclist']['docs'][0]['browserVersion']; if (isset($hashes[$browser])) { $hashes[$browser] ++; } elseif (count($hashes) < $limit) { diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/NewItemsTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/NewItemsTest.php index 436e6e0e90e..2a47fda1c9a 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/NewItemsTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Controller/Plugin/NewItemsTest.php @@ -199,7 +199,7 @@ class NewItemsTest extends TestCase public function testGetSolrFilter() { $range = 30; - $expected = 'first_indexed:[NOW-' . $range .'DAY TO NOW]'; + $expected = 'first_indexed:[NOW-' . $range . 'DAY TO NOW]'; $newItems = new NewItems(new Config(array())); $this->assertEquals($expected, $newItems->getSolrFilter($range)); } diff --git a/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php b/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php index 1e0c59c54d6..7e07204204d 100644 --- a/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php +++ b/module/VuFindAdmin/src/VuFindAdmin/Controller/TagsController.php @@ -210,13 +210,13 @@ class TagsController extends AbstractAdmin $tag = $this->getTable('tags') ->select(array('id' => $this->getParam('tag_id'))) ->current(); - $tagMsg = (false !== $tag) ? $tag->tag. " (" . $tag->id . ")" : " All"; + $tagMsg = (false !== $tag) ? $tag->tag . " (" . $tag->id . ")" : " All"; $resource = $this->getTable('resource') ->select(array('id' => $this->getParam('resource_id'))) ->current(); $resourceMsg = (false !== $resource) - ? $resource->title. " (" . $resource->id . ")" : " All"; + ? $resource->title . " (" . $resource->id . ")" : " All"; $messages[] = array( 'msg' => 'tag_delete_warning', diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php index 77f80b81dbd..21e4e992b3f 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php @@ -136,7 +136,7 @@ abstract class EdsApi_REST_Base public function info($authenticationToken = null, $sessionToken = null) { $this->debugPrint("Info"); - $url = $this->edsApiHost.'/info'; + $url = $this->edsApiHost . '/info'; $headers = $this->setTokens($authenticationToken, $sessionToken); return $this->call($url, $headers); } @@ -158,7 +158,7 @@ abstract class EdsApi_REST_Base . "$profile, guest: $isGuest, authToken: $authToken " ); $qs = array('profile' => $profile, 'guest' => $isGuest); - $url = $this->edsApiHost.'/createsession'; + $url = $this->edsApiHost . '/createsession'; $headers = $this->setTokens($authToken, null); return $this->call($url, $headers, $qs); } @@ -188,7 +188,7 @@ abstract class EdsApi_REST_Base if (null != $highlightTerms) { $qs['highlightterms'] = $highlightTerms; } - $url = $this->edsApiHost.'/retrieve'; + $url = $this->edsApiHost . '/retrieve'; $headers = $this->setTokens($authenticationToken, $sessionToken); return $this->call($url, $headers, $qs); @@ -208,7 +208,7 @@ abstract class EdsApi_REST_Base // Query String Parameters $qs = $query->convertToQueryStringParameterArray(); $this->debugPrint('Query: ' . print_r($qs, true)); - $url = $this->edsApiHost.'/search'; + $url = $this->edsApiHost . '/search'; $headers = $this->setTokens($authenticationToken, $sessionToken); return $this->call($url, $headers, $qs); } @@ -227,7 +227,7 @@ abstract class EdsApi_REST_Base $this->debugPrint( "Authenticating: username: $username, password: $password, orgid: $orgid" ); - $url = $this->authHost.'/uidauth'; + $url = $this->authHost . '/uidauth'; $org = isset($orgid) ? $orgid : $this->orgId; $authInfo = array(); if (isset($username)) { @@ -267,13 +267,13 @@ abstract class EdsApi_REST_Base $cnt = $cnt + 1 ; $finalParameterName = $parameterName; if (SearchRequestModel::isParameterIndexed($key)) { - $finalParameterName = $parameterName.'-'.$cnt; + $finalParameterName = $parameterName . '-' . $cnt; } $queryParameters[] - = $finalParameterName.'='.urlencode($subValue); + = $finalParameterName . '=' . urlencode($subValue); } } else { - $queryParameters[] = $key.'='.urlencode($value); + $queryParameters[] = $key . '=' . urlencode($value); } } } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/QueryBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/QueryBuilder.php index 846a4a8ee07..7188a318544 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/QueryBuilder.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/QueryBuilder.php @@ -84,10 +84,10 @@ class QueryBuilder $fieldCode = ($query->getHandler() == 'AllFields') ? '' : $query->getHandler(); //fieldcode if (!empty($fieldCode)) { - $expression = $fieldCode.':'.$expression; + $expression = $fieldCode . ':' . $expression; } if (!empty($operator)) { - $expression = $operator.','.$expression; + $expression = $operator . ',' . $expression; } return $expression; } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/QueryBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/QueryBuilder.php index c13dd325429..34be1829a66 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/QueryBuilder.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/QueryBuilder.php @@ -122,7 +122,7 @@ class QueryBuilder $excludes[] = join(" OR ", $thisGroup); } else { $groups[] - = join(" ".$params->getOperator()." ", $thisGroup); + = join(" " . $params->getOperator() . " ", $thisGroup); } } else { // Basic Search diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/SRU/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/SRU/Connector.php index e6789ed88d3..d2e5e62c9bf 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/SRU/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/SRU/Connector.php @@ -197,7 +197,7 @@ class Connector implements \Zend\Log\LoggerAwareInterface protected function call($method = 'GET', $params = null, $process = true) { if ($params) { - $query = array('version='.$this->sruVersion); + $query = array('version=' . $this->sruVersion); foreach ($params as $function => $value) { if (is_array($value)) { foreach ($value as $additional) { diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/QueryBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/QueryBuilder.php index 5485327727b..40a44c54a0f 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/Summon/QueryBuilder.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/Summon/QueryBuilder.php @@ -122,7 +122,7 @@ class QueryBuilder $excludes[] = join(" OR ", $thisGroup); } else { $groups[] - = join(" ".$params->getOperator()." ", $thisGroup); + = join(" " . $params->getOperator() . " ", $thisGroup); } } else { // Basic Search diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/QueryBuilder.php b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/QueryBuilder.php index 06b40ff7793..d5043b747c4 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/QueryBuilder.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/WorldCat/QueryBuilder.php @@ -135,7 +135,7 @@ class QueryBuilder $excludes[] = join(" OR ", $thisGroup); } else { $groups[] - = join(" ".$params->getOperator()." ", $thisGroup); + = join(" " . $params->getOperator() . " ", $thisGroup); } } else { // Basic Search diff --git a/module/VuFindTheme/src/VuFindTheme/LessCompiler.php b/module/VuFindTheme/src/VuFindTheme/LessCompiler.php index c8a098b10ee..e3216f150ae 100644 --- a/module/VuFindTheme/src/VuFindTheme/LessCompiler.php +++ b/module/VuFindTheme/src/VuFindTheme/LessCompiler.php @@ -142,7 +142,7 @@ class LessCompiler } } - \Less_Cache::SetCacheDir(APPLICATION_PATH.'/themes/'.$theme.'/css/less/'); + \Less_Cache::SetCacheDir(APPLICATION_PATH . '/themes/' . $theme . '/css/less/'); \Less_Cache::CleanCache(); // deletes week old files } -- GitLab