From 7a682117ea8367e3088ac56ca69957803b4c5fa8 Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Thu, 19 Oct 2017 14:32:41 -0400 Subject: [PATCH] Use short scalar casting. --- .../VuFindTest/Cache/Storage/Adapter/NoCacheAdapterTest.php | 2 +- .../VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/module/VuFind/tests/unit-tests/src/VuFindTest/Cache/Storage/Adapter/NoCacheAdapterTest.php b/module/VuFind/tests/unit-tests/src/VuFindTest/Cache/Storage/Adapter/NoCacheAdapterTest.php index 8d516fc7749..0b9f9e87038 100644 --- a/module/VuFind/tests/unit-tests/src/VuFindTest/Cache/Storage/Adapter/NoCacheAdapterTest.php +++ b/module/VuFind/tests/unit-tests/src/VuFindTest/Cache/Storage/Adapter/NoCacheAdapterTest.php @@ -52,6 +52,6 @@ class NoCacheAdapterTest extends PHPUnit_Framework_TestCase { $cache = new NoCacheAdapter(); $cache->setItem('key', 'value'); - $this->assertFalse((boolean)$cache->hasItem('key')); + $this->assertFalse((bool)$cache->hasItem('key')); } } diff --git a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php index 6059dc196dd..63fe7c2729e 100644 --- a/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php +++ b/module/VuFindSearch/src/VuFindSearch/Backend/EIT/Connector.php @@ -124,7 +124,7 @@ class Connector implements \Zend\Log\LoggerAwareInterface return [ 'docs' => $finalDocs, 'offset' => $offset, - 'total' => (integer)$xml->Hits + 'total' => (int)$xml->Hits ]; } @@ -215,7 +215,7 @@ class Connector implements \Zend\Log\LoggerAwareInterface return [ 'docs' => $finalDocs, 'offset' => 0, - 'total' => (integer)$xml->Hits + 'total' => (int)$xml->Hits ]; } } -- GitLab