From bad06494be84ee3fe49a92ad7e8787230d47b2d4 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Tue, 10 Feb 2015 14:15:30 -0500 Subject: [PATCH] php-cs-fixer: ternary_spaces --- module/VuFind/src/VuFind/Db/Table/UserStatsFields.php | 2 +- module/VuFind/src/VuFind/ILS/Driver/Aleph.php | 4 ++-- module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php | 10 +++++----- module/VuFind/src/VuFind/ILS/Driver/Demo.php | 2 +- module/VuFind/src/VuFind/ILS/Driver/Koha.php | 6 +++--- module/VuFind/src/VuFind/ILS/Driver/LBS4.php | 2 +- module/VuFind/src/VuFind/Log/Logger.php | 2 +- module/VuFind/src/VuFind/Recommend/TopFacets.php | 2 +- module/VuFind/src/VuFind/Recommend/VisualFacets.php | 2 +- module/VuFind/src/VuFind/RecordDriver/EDS.php | 4 ++-- module/VuFind/src/VuFind/RecordDriver/Summon.php | 2 +- module/VuFind/src/VuFind/Search/EDS/Options.php | 2 +- 12 files changed, 20 insertions(+), 20 deletions(-) diff --git a/module/VuFind/src/VuFind/Db/Table/UserStatsFields.php b/module/VuFind/src/VuFind/Db/Table/UserStatsFields.php index c2c95f16166..4de60a82e14 100644 --- a/module/VuFind/src/VuFind/Db/Table/UserStatsFields.php +++ b/module/VuFind/src/VuFind/Db/Table/UserStatsFields.php @@ -61,7 +61,7 @@ class UserStatsFields extends Gateway // Statistics data foreach ($stats as $field => $value) { if (gettype($value) == "boolean") { - $value = ($value) ? "true":"false"; + $value = ($value) ? "true" : "false"; } $this->insert( array( diff --git a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php index aebfdb260c3..26f48d6ed4f 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Aleph.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Aleph.php @@ -507,7 +507,7 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, */ protected function appendQueryString($url, $params) { - $sep = (strpos($url, "?") === false)?'?':'&'; + $sep = (strpos($url, "?") === false) ? '?' : '&'; if ($params != null) { foreach ($params as $key => $value) { $url .= $sep . $key . "=" . urlencode($value); @@ -905,7 +905,7 @@ class Aleph extends AbstractBase implements \Zend\Log\LoggerAwareInterface, $barcode = (string) $z30->{'z30-barcode'}; $transList[] = array( //'type' => $type, - 'id' => ($history)?null:$this->barcodeToID($barcode), + 'id' => ($history) ? null : $this->barcodeToID($barcode), 'item_id' => $group, 'location' => $location, 'title' => $title, diff --git a/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php b/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php index ad5168bfe32..5fbcfcc40b8 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php +++ b/module/VuFind/src/VuFind/ILS/Driver/ClaviusSQL.php @@ -353,7 +353,7 @@ class ClaviusSQL extends AbstractBase $status = "K dispozici"; $duedate = ''; } else { - $availability = ($item2['availability'] == 1)?true:false; + $availability = ($item2['availability'] == 1) ? true : false; $status = $item2['status']; $duedate = $item2['duedate']; } @@ -440,7 +440,7 @@ class ClaviusSQL extends AbstractBase 'amount' => abs($fine['amount']), 'checkout' => null, // TODO maybe 'fine' => $reasons[$fine['reason']], - 'balance' => ($fine['amount']<0)?abs($fine['amount']):0, + 'balance' => ($fine['amount']<0) ? abs($fine['amount']) : 0, 'createdate' => $fine['createdate'], 'duedate' => null, // TODO maybe 'id' => null, // TODO maybe @@ -554,7 +554,7 @@ class ClaviusSQL extends AbstractBase 'address1' => $patron2['tulice'], 'address2' => $patron2['tmesto'], 'zip' => $patron2['tpsc'], - 'phone' => $patron2['telefon']?$patron2['telefon']:null, + 'phone' => $patron2['telefon'] ? $patron2['telefon'] : null, 'group' => null //TODO - Maybe ); } @@ -700,7 +700,7 @@ class ClaviusSQL extends AbstractBase $kod3int = $kod3int - 5; } substr_replace($password, chr($kod3int), 2); - $sexConstant = $woman?1:0; + $sexConstant = $woman ? 1 : 0; $kod6 = substr($password, 5, 1); $kod6r = chr(70 + (intval($kod6) * 2) + $sexConstant); if ($kod6 != " ") { @@ -775,7 +775,7 @@ class ClaviusSQL extends AbstractBase 'lastname' => $names['lastname'], 'cat_username' => $username, 'cat_password' => $password, - 'email' => $patronRow['mail']?$patronRow['mail']:null, + 'email' => $patronRow['mail'] ? $patronRow['mail'] : null, 'major' => null, 'college' => null ); diff --git a/module/VuFind/src/VuFind/ILS/Driver/Demo.php b/module/VuFind/src/VuFind/ILS/Driver/Demo.php index 45c39e1b4e2..e1be6da2a83 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Demo.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Demo.php @@ -151,7 +151,7 @@ class Demo extends AbstractBase $loc = rand()%count($locations); return $returnText ? $locations[$loc]['locationDisplay'] - :$locations[$loc]['locationID']; + : $locations[$loc]['locationID']; } /** diff --git a/module/VuFind/src/VuFind/ILS/Driver/Koha.php b/module/VuFind/src/VuFind/ILS/Driver/Koha.php index b47c89cd39f..2ee6d6a9240 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Koha.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Koha.php @@ -256,10 +256,10 @@ class Koha extends AbstractBase $sqlStmt->execute(array(':id' => $id)); foreach ($sqlStmt->fetchAll() as $row) { $fineLst[] = array( - 'amount' => (null == $row['AMOUNT'])? 0 : $row['AMOUNT'], + 'amount' => (null == $row['AMOUNT']) ? 0 : $row['AMOUNT'], 'checkout' => $row['CHECKOUT'], - 'fine' => (null == $row['FINE'])? 'Unknown' : $row['FINE'], - 'balance' => (null == $row['BALANCE'])? 0 : $row['BALANCE'], + 'fine' => (null == $row['FINE']) ? 'Unknown' : $row['FINE'], + 'balance' => (null == $row['BALANCE']) ? 0 : $row['BALANCE'], 'duedate' => $row['DUEDATE'], 'id' => $row['BIBNO'] ); diff --git a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php index 2de7c99c270..ff3796a3154 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php +++ b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php @@ -751,7 +751,7 @@ class LBS4 extends AbstractBase implements TranslatorAwareInterface while ($row = sybase_fetch_row($sqlStmt)) { //$fine = $this->translate(('3'==$row[1])?'Overdue':'Dues'); $fine = $this->picaRecode($row[5]); - $amount = (null == $row[2])?0:$row[2]*100; + $amount = (null == $row[2]) ? 0 : $row[2]*100; //$balance = (null==$row[3])?0:$row[3]*100; $checkout = substr($row[3], 0, 12); $duedate = substr($row[4], 0, 12); diff --git a/module/VuFind/src/VuFind/Log/Logger.php b/module/VuFind/src/VuFind/Log/Logger.php index a4be9654c76..dc1c29f335a 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/TopFacets.php b/module/VuFind/src/VuFind/Recommend/TopFacets.php index 969cb820fdf..0190f6881f8 100644 --- a/module/VuFind/src/VuFind/Recommend/TopFacets.php +++ b/module/VuFind/src/VuFind/Recommend/TopFacets.php @@ -72,7 +72,7 @@ class TopFacets extends AbstractFacets public function setConfig($settings) { $settings = explode(':', $settings); - $mainSection = empty($settings[0]) ? 'ResultsTop':$settings[0]; + $mainSection = empty($settings[0]) ? 'ResultsTop' : $settings[0]; $iniName = isset($settings[1]) ? $settings[1] : 'facets'; // Load the desired facet information: diff --git a/module/VuFind/src/VuFind/Recommend/VisualFacets.php b/module/VuFind/src/VuFind/Recommend/VisualFacets.php index c55d4fa9aa6..6bd0f81e7fc 100644 --- a/module/VuFind/src/VuFind/Recommend/VisualFacets.php +++ b/module/VuFind/src/VuFind/Recommend/VisualFacets.php @@ -67,7 +67,7 @@ class VisualFacets extends AbstractFacets public function setConfig($settings) { $settings = explode(':', $settings); - $mainSection = empty($settings[0]) ? 'Visual_Settings':$settings[0]; + $mainSection = empty($settings[0]) ? 'Visual_Settings' : $settings[0]; $iniName = isset($settings[1]) ? $settings[1] : 'facets'; // Load the desired facet information: diff --git a/module/VuFind/src/VuFind/RecordDriver/EDS.php b/module/VuFind/src/VuFind/RecordDriver/EDS.php index ad817158548..6ccd1231645 100644 --- a/module/VuFind/src/VuFind/RecordDriver/EDS.php +++ b/module/VuFind/src/VuFind/RecordDriver/EDS.php @@ -260,7 +260,7 @@ class EDS extends SolrDefault ) { foreach ($this->fields['FullText']['Links'] as $link) { if (isset($link['Type']) && 'pdflink' == $link['Type']) { - return isset($link['Url']) ? $link['Url']: false; + return isset($link['Url']) ? $link['Url'] : false; } } } @@ -373,7 +373,7 @@ class EDS extends SolrDefault public function getPrimaryAuthor() { $authors = $this->getAuthors(); - return empty($authors) ? '': $authors[0]; + return empty($authors) ? '' : $authors[0]; } /** diff --git a/module/VuFind/src/VuFind/RecordDriver/Summon.php b/module/VuFind/src/VuFind/RecordDriver/Summon.php index c8f87ce9ac6..312b9d7a20a 100644 --- a/module/VuFind/src/VuFind/RecordDriver/Summon.php +++ b/module/VuFind/src/VuFind/RecordDriver/Summon.php @@ -371,7 +371,7 @@ class Summon extends SolrDefault public function getSeries() { return isset($this->fields['PublicationSeriesTitle']) - ? $this->fields['PublicationSeriesTitle']:array(); + ? $this->fields['PublicationSeriesTitle'] : array(); } /** diff --git a/module/VuFind/src/VuFind/Search/EDS/Options.php b/module/VuFind/src/VuFind/Search/EDS/Options.php index 089543e4f73..07f5dde3a50 100644 --- a/module/VuFind/src/VuFind/Search/EDS/Options.php +++ b/module/VuFind/src/VuFind/Search/EDS/Options.php @@ -620,7 +620,7 @@ class Options extends \VuFind\Search\Base\Options 'description' => $this->getLabelForCheckboxFilter( 'eds_limiter_' . $key, $limiter['Label'] ), - 'selected' => ('y' == $limiter['DefaultOn'])? true : false + 'selected' => ('y' == $limiter['DefaultOn']) ? true : false ); } } -- GitLab