From 2bb27da9e4a7ee382c40ebbd3287fdd0d7170eb0 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 19 Oct 2017 13:40:28 -0400 Subject: [PATCH] Style fixes. --- module/VuFind/src/VuFind/Cover/Generator.php | 10 +++++----- module/VuFind/src/VuFind/Db/Table/Comments.php | 2 +- module/VuFind/src/VuFind/ILS/Driver/Horizon.php | 10 +++++----- module/VuFind/src/VuFind/ILS/Driver/LBS4.php | 2 +- module/VuFind/src/VuFind/ILS/Driver/Symphony.php | 2 +- .../src/VuFindTest/Mink/AdvancedSearchTest.php | 12 ++++++------ .../src/VuFindTest/Search/SearchTabsHelperTest.php | 4 ++-- .../src/VuFindSearch/Backend/EDS/Base.php | 2 +- .../unit-tests/src/VuFindTest/LessCompilerTest.php | 6 +++--- 9 files changed, 25 insertions(+), 25 deletions(-) diff --git a/module/VuFind/src/VuFind/Cover/Generator.php b/module/VuFind/src/VuFind/Cover/Generator.php index 188e9eaf87e..507779c3dfe 100644 --- a/module/VuFind/src/VuFind/Cover/Generator.php +++ b/module/VuFind/src/VuFind/Cover/Generator.php @@ -678,20 +678,20 @@ class Generator // Generate 5 lines of text, 4 offset in a border color if ($scolor) { imagettftext( - $this->im, $fontSize, 0, $x, $y + 1, $scolor, $font, $text + $this->im, $fontSize, 0, $x, $y + 1, $scolor, $font, $text ); imagettftext( - $this->im, $fontSize, 0, $x, $y - 1, $scolor, $font, $text + $this->im, $fontSize, 0, $x, $y - 1, $scolor, $font, $text ); imagettftext( - $this->im, $fontSize, 0, $x + 1, $y, $scolor, $font, $text + $this->im, $fontSize, 0, $x + 1, $y, $scolor, $font, $text ); imagettftext( - $this->im, $fontSize, 0, $x - 1, $y, $scolor, $font, $text + $this->im, $fontSize, 0, $x - 1, $y, $scolor, $font, $text ); } // 1 centered in main color - imagettftext($this->im, $fontSize, 0, $x, $y, $mcolor, $font, $text); + imagettftext($this->im, $fontSize, 0, $x, $y, $mcolor, $font, $text); } /** diff --git a/module/VuFind/src/VuFind/Db/Table/Comments.php b/module/VuFind/src/VuFind/Db/Table/Comments.php index bb9ea36984b..bcd0a22721a 100644 --- a/module/VuFind/src/VuFind/Db/Table/Comments.php +++ b/module/VuFind/src/VuFind/Db/Table/Comments.php @@ -79,7 +79,7 @@ class Comments extends Gateway ['u' => 'user'], 'u.id = comments.user_id', ['firstname', 'lastname'] ); - $select->where->equalTo('comments.resource_id', $resource->id); + $select->where->equalTo('comments.resource_id', $resource->id); $select->order('comments.created'); }; diff --git a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php index 7ab8003a68e..ec275a31f27 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Horizon.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Horizon.php @@ -148,13 +148,13 @@ class Horizon extends AbstractBase if (in_array(strtolower('available:0'), $arrayValues)) { $available = 0; } - if (in_array(strtolower('reserve:N'), $arrayValues)) { + if (in_array(strtolower('reserve:N'), $arrayValues)) { $reserve = 'N'; } - if (in_array(strtolower('reserve:Y'), $arrayValues)) { + if (in_array(strtolower('reserve:Y'), $arrayValues)) { $reserve = 'Y'; } - if (in_array(strtolower('duedate:0'), $arrayValues)) { + if (in_array(strtolower('duedate:0'), $arrayValues)) { $duedate = ''; } } else { @@ -510,7 +510,7 @@ class Horizon extends AbstractBase $sqlStmt = mssql_query($sql); $row = mssql_fetch_assoc($sqlStmt); if ($row) { - list($lastname,$firstname) = explode(', ', $row['FULLNAME']); + list($lastname, $firstname) = explode(', ', $row['FULLNAME']); $user = ['id' => $username, 'firstname' => $firstname, 'lastname' => $lastname, @@ -807,7 +807,7 @@ class Horizon extends AbstractBase $row = mssql_fetch_assoc($sqlStmt); if ($row) { - list($lastname,$firstname) = explode(', ', $row['FULLNAME']); + list($lastname, $firstname) = explode(', ', $row['FULLNAME']); $profile = ['lastname' => $lastname, 'firstname' => $firstname, 'address1' => $row['ADDRESS1'], diff --git a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php index 36fb4661f19..fa2dee07f5e 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/LBS4.php +++ b/module/VuFind/src/VuFind/ILS/Driver/LBS4.php @@ -424,7 +424,7 @@ class LBS4 extends DAIA implements TranslatorAwareInterface $fine = $this->picaRecode($row[5]); $amount = (null == $row[2]) ? 0 : $row[2] * 100; //$balance = (null==$row[3])?0:$row[3]*100; - $checkout = substr($row[3], 0, 12); + $checkout = substr($row[3], 0, 12); $duedate = substr($row[4], 0, 12); $title = $this->picaRecode(substr($row[6], 0, 12)); $result[] = [ diff --git a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php index 92151683da4..6a22779cb11 100644 --- a/module/VuFind/src/VuFind/ILS/Driver/Symphony.php +++ b/module/VuFind/src/VuFind/ILS/Driver/Symphony.php @@ -1201,7 +1201,7 @@ class Symphony extends AbstractBase implements LoggerAwareInterface $group = null; } - list($lastname,$firstname) + list($lastname, $firstname) = explode(', ', $result->patronInfo->displayName); $profile = [ diff --git a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php index 66b848a91bb..dc52976ea76 100644 --- a/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php +++ b/module/VuFind/tests/integration-tests/src/VuFindTest/Mink/AdvancedSearchTest.php @@ -139,12 +139,12 @@ class AdvancedSearchTest extends \VuFindTest\Unit\MinkTestCase // Test edit search $this->editAdvancedSearch($page); $this->assertEquals('bride', $this->findCss($page, '#search_lookfor0_0')->getValue()); - $this->assertEquals('tomb', $this->findCss($page, '#search_lookfor0_1')->getValue()); + $this->assertEquals('tomb', $this->findCss($page, '#search_lookfor0_1')->getValue()); $this->assertEquals('Title', $this->findCss($page, '#search_type0_1')->getValue()); - $this->assertEquals('garbage', $this->findCss($page, '#search_lookfor0_2')->getValue()); - $this->assertEquals('1883', $this->findCss($page, '#search_lookfor0_3')->getValue()); - $this->assertEquals('year', $this->findCss($page, '#search_type0_3')->getValue()); - $this->assertEquals('miller', $this->findCss($page, '#search_lookfor1_0')->getValue()); + $this->assertEquals('garbage', $this->findCss($page, '#search_lookfor0_2')->getValue()); + $this->assertEquals('1883', $this->findCss($page, '#search_lookfor0_3')->getValue()); + $this->assertEquals('year', $this->findCss($page, '#search_type0_3')->getValue()); + $this->assertEquals('miller', $this->findCss($page, '#search_lookfor1_0')->getValue()); // Term removal $session->executeScript("deleteSearch(0, 2)"); // search0_2 x click @@ -167,6 +167,6 @@ class AdvancedSearchTest extends \VuFindTest\Unit\MinkTestCase // Test edit search (modified search is restored properly) $this->editAdvancedSearch($page); - $this->assertEquals('miller', $this->findCss($page, '#search_lookfor0_0')->getValue()); + $this->assertEquals('miller', $this->findCss($page, '#search_lookfor0_0')->getValue()); } } diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/SearchTabsHelperTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/SearchTabsHelperTest.php index 9f6c92df66c..05138632641 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Search/SearchTabsHelperTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Search/SearchTabsHelperTest.php @@ -132,9 +132,9 @@ class SearchTabsHelperTest extends TestCase { $helper = $this->getSearchTabsHelper(); $this->assertEquals( - $this->tabConfig['default_unfiltered'], $helper->getTabConfig() + $this->tabConfig['default_unfiltered'], $helper->getTabConfig() ); - $this->assertEquals($this->filterConfig, $helper->getTabFilterConfig()); + $this->assertEquals($this->filterConfig, $helper->getTabFilterConfig()); } /** diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php index cae4b07e2ca..6f47edd8fb2 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EDS/Base.php @@ -238,7 +238,7 @@ abstract class EdsApi_REST_Base $authInfo['orgid'] = $org; } $messageBody = json_encode($authInfo); - return $this->call($url, null, null, 'POST', $messageBody); + return $this->call($url, null, null, 'POST', $messageBody); } /** diff --git a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/LessCompilerTest.php b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/LessCompilerTest.php index c2f16ebee51..b511f24297a 100644 --- a/module/VuFindTheme/tests/unit-tests/src/VuFindTest/LessCompilerTest.php +++ b/module/VuFindTheme/tests/unit-tests/src/VuFindTest/LessCompilerTest.php @@ -59,9 +59,9 @@ class LessCompilerTest extends Unit\TestCase $temp = sys_get_temp_dir(); $testDest = $temp . '/vufind_less_comp_test/'; // Create directory structure, recursively - mkdir($testDest . 'themes/child/less', 0777, true); - mkdir($testDest . 'themes/empty', 0777, true); - mkdir($testDest . 'themes/parent/css', 0777, true); + mkdir($testDest . 'themes/child/less', 0777, true); + mkdir($testDest . 'themes/empty', 0777, true); + mkdir($testDest . 'themes/parent/css', 0777, true); mkdir($testDest . 'themes/parent/less/relative', 0777, true); file_put_contents( $testDest . 'themes/empty/theme.config.php', -- GitLab