From d4387c6b6560a566e59a4491837cf1d4d9ed81be Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Tue, 24 Oct 2017 15:19:20 -0400
Subject: [PATCH] Normalize binary operator spaces.

---
 themes/bootstrap3/templates/Auth/ChoiceAuth/login.phtml   | 2 +-
 themes/bootstrap3/templates/Helpers/pagination.phtml      | 2 +-
 themes/bootstrap3/templates/Recommend/AuthorFacets.phtml  | 2 +-
 .../templates/Recommend/OpenLibrarySubjects.phtml         | 2 +-
 .../bootstrap3/templates/Recommend/RandomRecommend.phtml  | 2 +-
 .../templates/Recommend/SideFacets/range-slider.phtml     | 2 +-
 .../templates/RecordDriver/SolrDefault/list-entry.phtml   | 2 +-
 .../templates/RecordTab/similaritemscarousel.phtml        | 4 ++--
 themes/bootstrap3/templates/cart/save.phtml               | 2 +-
 themes/bootstrap3/templates/myresearch/fines.phtml        | 6 +++---
 themes/bootstrap3/templates/myresearch/mylist.phtml       | 2 +-
 themes/bootstrap3/templates/record/save.phtml             | 4 ++--
 themes/bootstrap3/templates/search/advanced/eds.phtml     | 2 +-
 themes/bootstrap3/templates/search/advanced/layout.phtml  | 8 ++++----
 themes/bootstrap3/templates/search/advanced/ranges.phtml  | 2 +-
 themes/bootstrap3/templates/search/facet-list.phtml       | 4 ++--
 themes/bootstrap3/templates/search/list-list.phtml        | 2 +-
 17 files changed, 25 insertions(+), 25 deletions(-)

diff --git a/themes/bootstrap3/templates/Auth/ChoiceAuth/login.phtml b/themes/bootstrap3/templates/Auth/ChoiceAuth/login.phtml
index 34a651e5aa2..1a4770e124d 100644
--- a/themes/bootstrap3/templates/Auth/ChoiceAuth/login.phtml
+++ b/themes/bootstrap3/templates/Auth/ChoiceAuth/login.phtml
@@ -3,7 +3,7 @@
 <? $methods = $this->auth()->getManager()->getSelectableAuthOptions(); ?>
 <? $count = count($methods); ?>
 <? foreach ($methods as $loop=>$method):?>
-  <div class="authmethod<?=$loop?> span<?=floor(12/$count) ?>">
+  <div class="authmethod<?=$loop?> span<?=floor(12 / $count) ?>">
     <? $this->auth()->getManager()->setAuthMethod($method) ?>
     <?=$this->auth()->getLoginDesc() ?>
     <?=$this->auth()->getLogin() ?>
diff --git a/themes/bootstrap3/templates/Helpers/pagination.phtml b/themes/bootstrap3/templates/Helpers/pagination.phtml
index 584ac0d8234..76fd7ba1079 100644
--- a/themes/bootstrap3/templates/Helpers/pagination.phtml
+++ b/themes/bootstrap3/templates/Helpers/pagination.phtml
@@ -36,7 +36,7 @@
     <? endforeach; ?>
 
     <!-- Last page link -->
-    <li<? if (isset($this->last)  && $this->last != $this->current): ?>>
+    <li<? if (isset($this->last) && $this->last != $this->current): ?>>
       <? $newParams = $this->params; $newParams['page'] = $this->last; ?>
       <a href="<?= $this->currentPath() . '?' . http_build_query($newParams); ?>">
         <?=$this->translate('Last')?>
diff --git a/themes/bootstrap3/templates/Recommend/AuthorFacets.phtml b/themes/bootstrap3/templates/Recommend/AuthorFacets.phtml
index 678d50f9111..529124856b7 100644
--- a/themes/bootstrap3/templates/Recommend/AuthorFacets.phtml
+++ b/themes/bootstrap3/templates/Recommend/AuthorFacets.phtml
@@ -11,7 +11,7 @@
           <div class="author-list">
         <? endif; ?>
         <a href="<?=$this->url('author-home') . '?author=' . urlencode($author['value'])?>"><?=$author['value'] ?><? /* count disabled -- uncomment to add: echo ' - ' . $author['count']; */ ?></a>
-        <? if ($i+1 < count($similarAuthors['list'])): ?>
+        <? if ($i + 1 < count($similarAuthors['list'])): ?>
           <br/>
         <? endif; ?>
       <? endforeach; ?>
diff --git a/themes/bootstrap3/templates/Recommend/OpenLibrarySubjects.phtml b/themes/bootstrap3/templates/Recommend/OpenLibrarySubjects.phtml
index 372687659d0..d1ad292c9e9 100644
--- a/themes/bootstrap3/templates/Recommend/OpenLibrarySubjects.phtml
+++ b/themes/bootstrap3/templates/Recommend/OpenLibrarySubjects.phtml
@@ -7,7 +7,7 @@
       <li>
         <a href="http://openlibrary.org<?=$work['key']?>" title="<?=$this->transEsc('Get full text')?>" target="_blank">
           <span class="olSubjectCover">
-          <? if (isset($work['cover_id'])  && !empty($work['cover_id'])): ?>
+          <? if (isset($work['cover_id']) && !empty($work['cover_id'])): ?>
             <img src="http://covers.openlibrary.org/b/<?=$this->escapeHtmlAttr($work['cover_id_type'])?>/<?=$this->escapeHtmlAttr($work['cover_id'])?>-S.jpg" class="olSubjectImage" alt="<?=$this->escapeHtmlAttr($work['title'])?>" />
           <? else: ?>
             <img src="<?=$this->imageLink('noCover2.gif')?>" class="olSubjectImage" alt="<?=$this->escapeHtmlAttr($work['title'])?>" />
diff --git a/themes/bootstrap3/templates/Recommend/RandomRecommend.phtml b/themes/bootstrap3/templates/Recommend/RandomRecommend.phtml
index 07e745113c1..646d255b26e 100644
--- a/themes/bootstrap3/templates/Recommend/RandomRecommend.phtml
+++ b/themes/bootstrap3/templates/Recommend/RandomRecommend.phtml
@@ -1,4 +1,4 @@
-<? $recommend = $this->recommend->getResults(); if (count($recommend)> 0): ?>
+<? $recommend = $this->recommend->getResults(); if (count($recommend) > 0): ?>
   <ul class="list-group random <?=$this->recommend->getDisplayMode()?>">
     <li class="list-group-item title" data-toggle="collapse" href="#side-collapse-randomrecommend">
       <?=$this->transEsc("random_recommendation_title")?>
diff --git a/themes/bootstrap3/templates/Recommend/SideFacets/range-slider.phtml b/themes/bootstrap3/templates/Recommend/SideFacets/range-slider.phtml
index 4dae71c02fd..52d6f0ab772 100644
--- a/themes/bootstrap3/templates/Recommend/SideFacets/range-slider.phtml
+++ b/themes/bootstrap3/templates/Recommend/SideFacets/range-slider.phtml
@@ -28,7 +28,7 @@
   <? $this->headLink()->appendStylesheet('vendor/bootstrap-slider.min.css'); ?>
   <?
     $min = !empty($this->facet['values'][0]) ? min($this->facet['values'][0], 1400) : 1400;
-    $future = date('Y', time()+31536000); // next year
+    $future = date('Y', time() + 31536000); // next year
     $max = !empty($this->facet['values'][1]) ? max($future, $this->facet['values'][1]) : $future;
     $low  = !empty($this->facet['values'][0]) ? $this->facet['values'][0] : $min;
     $high = !empty($this->facet['values'][1]) ? $this->facet['values'][1] : $max;
diff --git a/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml b/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml
index 4ffe44e1b37..f15e1af2d9e 100644
--- a/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml
+++ b/themes/bootstrap3/templates/RecordDriver/SolrDefault/list-entry.phtml
@@ -108,7 +108,7 @@
           <? if (count($this->lists) > 0): ?>
               <strong><?=$this->transEsc('Saved in')?>:</strong>
               <? $i=0;foreach($this->lists as $current): ?>
-                  <a href="<?=$this->url('userList', array('id' => $current->id))?>"><?=$this->escapeHtml($current->title)?></a><? if($i++ < count($this->lists)-1): ?>,<? endif; ?>
+                  <a href="<?=$this->url('userList', array('id' => $current->id))?>"><?=$this->escapeHtml($current->title)?></a><? if($i++ < count($this->lists) - 1): ?>,<? endif; ?>
               <? endforeach; ?>
               <br/>
           <? endif; ?>
diff --git a/themes/bootstrap3/templates/RecordTab/similaritemscarousel.phtml b/themes/bootstrap3/templates/RecordTab/similaritemscarousel.phtml
index c2e591b20bc..942691bdfca 100644
--- a/themes/bootstrap3/templates/RecordTab/similaritemscarousel.phtml
+++ b/themes/bootstrap3/templates/RecordTab/similaritemscarousel.phtml
@@ -6,7 +6,7 @@
     <!-- Indicators -->
     <ol class="carousel-indicators">
       <li data-target="#similar-items-carousel" data-slide-to="0" class="active"></li>
-      <? for($i=1;$i<count($similarRecords)/$perPage;$i++): ?>
+      <? for($i=1;$i < count($similarRecords) / $perPage;$i++): ?>
         <li data-target="#similar-items-carousel" data-slide-to="<?=$i ?>"></li>
       <? endfor; ?>
     </ol>
@@ -32,7 +32,7 @@
               </div>
             </a>
           </div>
-          <? if(($index+1) % $perPage == 0 && $index < count($similarRecords)-1): ?>
+          <? if(($index + 1) % $perPage == 0 && $index < count($similarRecords) - 1): ?>
       </div>
       <div class="item">
           <? endif; ?>
diff --git a/themes/bootstrap3/templates/cart/save.phtml b/themes/bootstrap3/templates/cart/save.phtml
index 80a149db085..256857b6562 100644
--- a/themes/bootstrap3/templates/cart/save.phtml
+++ b/themes/bootstrap3/templates/cart/save.phtml
@@ -39,7 +39,7 @@
     <select id="save_list" name="list" class="form-control">
       <? if (count($this->lists) > 0): ?>
         <? foreach ($this->lists as $list): ?>
-          <option value="<?=$list['id'] ?>"<? if ($list['id']==$this->userList()->lastUsed()): ?> selected="selected"<? endif; ?>><?=$this->escapeHtml($list['title'])?></option>
+          <option value="<?=$list['id'] ?>"<? if ($list['id'] == $this->userList()->lastUsed()): ?> selected="selected"<? endif; ?>><?=$this->escapeHtml($list['title'])?></option>
         <? endforeach; ?>
       <? else: ?>
         <option value=""><?=$this->transEsc('My Favorites') ?></option>
diff --git a/themes/bootstrap3/templates/myresearch/fines.phtml b/themes/bootstrap3/templates/myresearch/fines.phtml
index e42726f1b52..bbc8c2625bb 100644
--- a/themes/bootstrap3/templates/myresearch/fines.phtml
+++ b/themes/bootstrap3/templates/myresearch/fines.phtml
@@ -38,12 +38,12 @@
         <td><?=isset($record['checkout']) ? $this->escapeHtml($record['checkout']) : ''?></td>
         <td><?=isset($record['duedate']) ? $this->escapeHtml($record['duedate']) : ''?></td>
         <td><?=isset($record['fine']) ? $this->escapeHtml($record['fine']) : ''?></td>
-        <td><?=isset($record['amount']) ? $this->safeMoneyFormat($record['amount']/100.00) : ''?></td>
-        <td><?=isset($record['balance']) ? $this->safeMoneyFormat($record['balance']/100.00) : ''?></td>
+        <td><?=isset($record['amount']) ? $this->safeMoneyFormat($record['amount'] / 100.00) : ''?></td>
+        <td><?=isset($record['balance']) ? $this->safeMoneyFormat($record['balance'] / 100.00) : ''?></td>
       </tr>
       <? $totalDue += $record['balance']; ?>
     <? endforeach; ?>
-      <tr style="font-weight:bold"><td colspan="5"><?=$this->transEsc('Total Balance Due')?></td><td><?=$this->safeMoneyFormat($totalDue/100.00) ?></td></tr>
+      <tr style="font-weight:bold"><td colspan="5"><?=$this->transEsc('Total Balance Due')?></td><td><?=$this->safeMoneyFormat($totalDue / 100.00) ?></td></tr>
     </table>
   <? endif; ?>
 </div>
diff --git a/themes/bootstrap3/templates/myresearch/mylist.phtml b/themes/bootstrap3/templates/myresearch/mylist.phtml
index 0c3ace56786..d016adee69f 100644
--- a/themes/bootstrap3/templates/myresearch/mylist.phtml
+++ b/themes/bootstrap3/templates/myresearch/mylist.phtml
@@ -13,7 +13,7 @@
   $this->headScript()->appendFile("check_item_statuses.js");
 
   // Load Javascript only if list view parameter is NOT full:
-  if ($this->params->getOptions()->getListViewOption()!="full") {
+  if ($this->params->getOptions()->getListViewOption() != "full") {
     $this->headScript()->appendFile("record.js");
     $this->headScript()->appendFile("embedded_record.js");
   }
diff --git a/themes/bootstrap3/templates/record/save.phtml b/themes/bootstrap3/templates/record/save.phtml
index 33ee765c2a4..b4ddeaeae26 100644
--- a/themes/bootstrap3/templates/record/save.phtml
+++ b/themes/bootstrap3/templates/record/save.phtml
@@ -15,7 +15,7 @@
   <? if (!empty($this->containingLists)): ?>
     <p><?=$this->transEsc('This item is already part of the following list/lists') ?>:
     <? foreach ($this->containingLists as $i=>$list): ?>
-      <a href="<?=$this->url('userList', ['id' => $list['id']]) ?>" data-lightbox-ignore><?=$this->escapeHtml($list['title'])?></a><? if($i<count($this->containingLists)-1): ?>, <? endif; ?>
+      <a href="<?=$this->url('userList', ['id' => $list['id']]) ?>" data-lightbox-ignore><?=$this->escapeHtml($list['title'])?></a><? if($i < count($this->containingLists) - 1): ?>, <? endif; ?>
     <? endforeach; ?>
     </p><hr/>
   <? endif; ?>
@@ -32,7 +32,7 @@
       <select class="form-control" id="save_list" name="list">
       <? if ($this->nonContainingLists): ?>
         <? foreach ($this->nonContainingLists as $list): ?>
-          <option value="<?=$list['id'] ?>"<? if ($list['id']==$this->userList()->lastUsed()): ?> selected="selected"<? endif; ?>><?=$this->escapeHtml($list['title'])?></option>
+          <option value="<?=$list['id'] ?>"<? if ($list['id'] == $this->userList()->lastUsed()): ?> selected="selected"<? endif; ?>><?=$this->escapeHtml($list['title'])?></option>
         <? endforeach; ?>
       <? else: ?>
         <option value=""><?=$this->transEsc('My Favorites') ?></option>
diff --git a/themes/bootstrap3/templates/search/advanced/eds.phtml b/themes/bootstrap3/templates/search/advanced/eds.phtml
index 435049e56eb..b76550a0de4 100644
--- a/themes/bootstrap3/templates/search/advanced/eds.phtml
+++ b/themes/bootstrap3/templates/search/advanced/eds.phtml
@@ -93,7 +93,7 @@
         $this->headScript()->appendFile('vendor/bootstrap-slider.min.js');
         $this->headLink()->appendStylesheet('vendor/bootstrap-slider.min.css');
         $min = !empty($current['values'][0]) ? min($current['values'][0], 1400) : 1400;
-        $future = date('Y', time()+31536000);
+        $future = date('Y', time() + 31536000);
         $max = !empty($current['values'][1]) ? max($future, $current['values'][1]) : $future;
         $low  = !empty($current['values'][0]) ? $current['values'][0] : $min;
         $high = !empty($current['values'][1]) ? $current['values'][1] : $max;
diff --git a/themes/bootstrap3/templates/search/advanced/layout.phtml b/themes/bootstrap3/templates/search/advanced/layout.phtml
index 1ccc2310a25..66c1624dc77 100644
--- a/themes/bootstrap3/templates/search/advanced/layout.phtml
+++ b/themes/bootstrap3/templates/search/advanced/layout.phtml
@@ -79,8 +79,8 @@
         <div id="groupJoin" class="form-inline pull-right flip">
           <label for="groupJoinOptions"><?=$this->transEsc("search_match")?>:</label>
           <select id="groupJoinOptions" name="join" class="form-control">
-            <option value="AND"<? if($searchDetails && $searchDetails->getOperator()=='ALL'):?> selected<?endif?>><?= $this->transEsc('group_AND') ?></option>
-            <option value="OR"<? if($searchDetails && $searchDetails->getOperator()=='OR'):?> selected<?endif?>><?= $this->transEsc('group_OR') ?></option>
+            <option value="AND"<? if($searchDetails && $searchDetails->getOperator() == 'ALL'):?> selected<?endif?>><?= $this->transEsc('group_AND') ?></option>
+            <option value="OR"<? if($searchDetails && $searchDetails->getOperator() == 'OR'):?> selected<?endif?>><?= $this->transEsc('group_OR') ?></option>
           </select>
         </div>
       </div>
@@ -93,14 +93,14 @@
         <? if(!empty($this->formOverride)): ?>
           <?=$this->formOverride ?>
         <? else: ?>
-          <? for($group=0; $group<3 || $group<=$setGroupCount; $group++): ?>
+          <? for($group=0; $group < 3 || $group <= $setGroupCount; $group++): ?>
             <? if($group == 0): ?>
               <div id="new_group_template">
             <? endif; ?>
             <div id="group<?=$group ?>" class="adv-group">
               <div class="adv-group-terms">
                 <label class="adv-group-label"><?=$this->transEsc("adv_search_label")?>:</label>
-                <? for($search=0; $search<3 || (isset($setQueries[$group]) && $search<count($setQueries[$group])); $search++): ?>
+                <? for($search=0; $search < 3 || (isset($setQueries[$group]) && $search < count($setQueries[$group])); $search++): ?>
                   <? if($group == 0 && $search == 0): ?>
                     <div id="new_search_template">
                   <? endif; ?>
diff --git a/themes/bootstrap3/templates/search/advanced/ranges.phtml b/themes/bootstrap3/templates/search/advanced/ranges.phtml
index ba22ac62184..500b86c6c34 100644
--- a/themes/bootstrap3/templates/search/advanced/ranges.phtml
+++ b/themes/bootstrap3/templates/search/advanced/ranges.phtml
@@ -23,7 +23,7 @@
           $this->headScript()->appendFile('vendor/bootstrap-slider.min.js');
           $this->headLink()->appendStylesheet('vendor/bootstrap-slider.min.css');
           $min = !empty($current['values'][0]) ? min($current['values'][0], 1400) : 1400;
-          $future = date('Y', time()+31536000);
+          $future = date('Y', time() + 31536000);
           $max = !empty($current['values'][1]) ? max($future, $current['values'][1]) : $future;
           $low  = !empty($current['values'][0]) ? $current['values'][0] : $min;
           $high = !empty($current['values'][1]) ? $current['values'][1] : $max;
diff --git a/themes/bootstrap3/templates/search/facet-list.phtml b/themes/bootstrap3/templates/search/facet-list.phtml
index 3b73ba6ed09..433e70d90bc 100644
--- a/themes/bootstrap3/templates/search/facet-list.phtml
+++ b/themes/bootstrap3/templates/search/facet-list.phtml
@@ -24,7 +24,7 @@
     <div class="full-facet-list facet-group<? if(!$active): ?> hidden<? endif; ?>" id="facet-list-<?=$this->escapeHtmlAttr($key) ?>">
       <? if ($active): ?>
         <? if ($this->page > 1): ?>
-          <a href="<?=$urlBase . '&amp;facetpage=' . ($this->page-1) . '&amp;facetsort=' . $this->sort ?>" class="facet js-facet-prev-page" data-page="<?=($this->page+1) ?>" data-sort="<?=$this->sort ?>" data-limit="<?=count($this->data) ?>" data-lightbox-ignore><?=$this->translate('prev') ?> ...</a>
+          <a href="<?=$urlBase . '&amp;facetpage=' . ($this->page - 1) . '&amp;facetsort=' . $this->sort ?>" class="facet js-facet-prev-page" data-page="<?=($this->page + 1) ?>" data-sort="<?=$this->sort ?>" data-limit="<?=count($this->data) ?>" data-lightbox-ignore><?=$this->translate('prev') ?> ...</a>
         <? endif; ?>
         <? foreach ($this->data as $item): ?>
           <? $toggleUrl = $item['isApplied']
@@ -64,7 +64,7 @@
         <? endforeach; ?>
       <? endif; ?>
       <? if ($this->anotherPage): ?>
-        <a href="<?=$urlBase . '&amp;facetpage=' . ($this->page+1) . '&amp;facetsort=' . urlencode($key) ?>" class="facet js-facet-next-page" data-page="<?=($this->page+1) ?>" data-sort="<?=$this->escapeHtmlAttr($key) ?>" data-lightbox-ignore><?=$this->translate('more') ?> ...</a>
+        <a href="<?=$urlBase . '&amp;facetpage=' . ($this->page + 1) . '&amp;facetsort=' . urlencode($key) ?>" class="facet js-facet-next-page" data-page="<?=($this->page + 1) ?>" data-sort="<?=$this->escapeHtmlAttr($key) ?>" data-lightbox-ignore><?=$this->translate('more') ?> ...</a>
       <? endif; ?>
     </div>
   <? endforeach; ?>
diff --git a/themes/bootstrap3/templates/search/list-list.phtml b/themes/bootstrap3/templates/search/list-list.phtml
index a3d3673e14d..041db291d07 100644
--- a/themes/bootstrap3/templates/search/list-list.phtml
+++ b/themes/bootstrap3/templates/search/list-list.phtml
@@ -1,7 +1,7 @@
 <? if (!isset($this->indexStart)) $this->indexStart = 0; ?>
 <? $i = $this->indexStart; ?>
 <? foreach ($this->results->getResults() as $current): ?>
-  <? $recordNumber = $this->results->getStartRecord() + $i-$this->indexStart; ?>
+  <? $recordNumber = $this->results->getStartRecord() + $i - $this->indexStart; ?>
   <div id="result<?=$i++ ?>" class="result<?=$current->supportsAjaxStatus()?' ajaxItem':''?>">
     <? if (isset($this->showCheckboxes) && $this->showCheckboxes): ?>
       <?=$this->record($current)->getCheckbox('', 'search-cart-form')?>
-- 
GitLab