From 4f7eaa24acbebeeb9e251a4ef951c39c5c2fd93b Mon Sep 17 00:00:00 2001 From: Demian Katz <demian.katz@villanova.edu> Date: Mon, 15 Apr 2013 15:11:26 -0400 Subject: [PATCH] Style fixes; eliminated obsolete tags. --- module/VuFind/src/VuFind/Bootstrapper.php | 2 +- .../VuFind/Config/Reader/CacheDecorator.php | 6 +++--- .../Controller/Widget/Solr/FacetInterface.php | 2 +- .../Controller/Widget/WidgetInterface.php | 4 ++-- .../VuFind/src/VuFind/Search/Base/Params.php | 2 -- .../VuFind/src/VuFind/Search/Base/Results.php | 2 -- .../VuFind/src/VuFind/Search/Solr/Results.php | 7 ++----- .../src/VuFind/Search/Summon/Results.php | 7 +++---- .../src/VuFind/Search/WorldCat/Results.php | 1 - module/VuFind/src/VuFindTest/Unit/TestCase.php | 6 +++--- .../src/Config/Reader/CacheDecoratorTest.php | 4 ++-- .../src/Search/BackendManagerTest.php | 4 ++-- .../src/Search/Solr/MultiIndexListenerTest.php | 12 ++++++------ module/VuFindHttp/Module.php | 10 +++++----- .../VuFindHttp/src/VuFindHttp/HttpService.php | 18 +++++++++--------- .../VuFindHttp/HttpServiceAwareInterface.php | 2 +- .../src/VuFindHttp/HttpServiceInterface.php | 10 +++++----- .../src/VuFindTest/HttpServiceTest.php | 18 +++++++++--------- module/VuFindSearch/Module.php | 7 +++---- .../VuFindTest/Backend/Solr/BackendTest.php | 8 ++++---- .../VuFindTest/Backend/Solr/ConnectorTest.php | 16 ++++++++-------- .../Solr/Response/Json/NamedListTest.php | 4 ++-- .../Json/RecordCollectionFactoryTest.php | 2 +- .../Solr/Response/Json/SpellcheckTest.php | 2 +- .../Backend/Solr/SearchHandlerTest.php | 2 +- 25 files changed, 74 insertions(+), 84 deletions(-) diff --git a/module/VuFind/src/VuFind/Bootstrapper.php b/module/VuFind/src/VuFind/Bootstrapper.php index cc2d955a177..1987b733250 100644 --- a/module/VuFind/src/VuFind/Bootstrapper.php +++ b/module/VuFind/src/VuFind/Bootstrapper.php @@ -360,7 +360,7 @@ class Bootstrapper * * @return void */ - protected function initSearch () + protected function initSearch() { $sm = $this->event->getApplication()->getServiceManager(); $bm = $sm->get('VuFind\Search\BackendManager'); diff --git a/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php b/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php index 380f5f6254c..ae435dd87bd 100644 --- a/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php +++ b/module/VuFind/src/VuFind/Config/Reader/CacheDecorator.php @@ -79,7 +79,7 @@ class CacheDecorator implements ReaderInterface * * @return array */ - public function fromFile ($filename) + public function fromFile($filename) { $absFilename = realpath($filename); $mtime = @filemtime($absFilename); @@ -99,7 +99,7 @@ class CacheDecorator implements ReaderInterface * * @return array|boolean */ - public function fromString ($string) + public function fromString($string) { $key = $this->generateKey($string); if ($this->storage->hasItem($key)) { @@ -119,7 +119,7 @@ class CacheDecorator implements ReaderInterface * * @return string */ - protected function generateKey ($string) + protected function generateKey($string) { return md5($string); } diff --git a/module/VuFind/src/VuFind/Controller/Widget/Solr/FacetInterface.php b/module/VuFind/src/VuFind/Controller/Widget/Solr/FacetInterface.php index 44bd158231b..35630a080ba 100644 --- a/module/VuFind/src/VuFind/Controller/Widget/Solr/FacetInterface.php +++ b/module/VuFind/src/VuFind/Controller/Widget/Solr/FacetInterface.php @@ -50,5 +50,5 @@ interface FacetInterface extends WidgetInterface * * @return void */ - public function updateState (Facets $facets); + public function updateState(Facets $facets); } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Controller/Widget/WidgetInterface.php b/module/VuFind/src/VuFind/Controller/Widget/WidgetInterface.php index 1ef87c0b167..486a2f496bd 100644 --- a/module/VuFind/src/VuFind/Controller/Widget/WidgetInterface.php +++ b/module/VuFind/src/VuFind/Controller/Widget/WidgetInterface.php @@ -57,13 +57,13 @@ interface WidgetInterface * * @return void */ - public function setState (Parameters $parameters); + public function setState(Parameters $parameters); /** * Return array representing the widget state as query parameters. * * @return array */ - public function getState (); + public function getState(); } \ No newline at end of file diff --git a/module/VuFind/src/VuFind/Search/Base/Params.php b/module/VuFind/src/VuFind/Search/Base/Params.php index 904accb3ba9..0794a429c03 100644 --- a/module/VuFind/src/VuFind/Search/Base/Params.php +++ b/module/VuFind/src/VuFind/Search/Base/Params.php @@ -1356,8 +1356,6 @@ class Params implements ServiceLocatorAwareInterface * Return search query object. * * @return VuFindSearch\Query\AbstractQuery - * - * @tag NEW SEARCH */ public function getQuery() { diff --git a/module/VuFind/src/VuFind/Search/Base/Results.php b/module/VuFind/src/VuFind/Search/Base/Results.php index 9f40d387101..c8e707a8398 100644 --- a/module/VuFind/src/VuFind/Search/Base/Results.php +++ b/module/VuFind/src/VuFind/Search/Base/Results.php @@ -68,7 +68,6 @@ abstract class Results implements ServiceLocatorAwareInterface * Search service. * * @var SearchService - * @tag NEW SEARCH */ protected $searchService; @@ -598,7 +597,6 @@ abstract class Results implements ServiceLocatorAwareInterface * * @todo May better error handling, throw a custom exception if search service * not present - * @tag NEW SEARCH */ protected function getSearchService() { diff --git a/module/VuFind/src/VuFind/Search/Solr/Results.php b/module/VuFind/src/VuFind/Search/Solr/Results.php index 5ac0a269578..304a6f367f0 100644 --- a/module/VuFind/src/VuFind/Search/Solr/Results.php +++ b/module/VuFind/src/VuFind/Search/Solr/Results.php @@ -57,7 +57,6 @@ class Results extends BaseResults * Search backend identifiers. * * @var string - * @tag NEW SEARCH */ protected $backendId = 'Solr'; @@ -73,7 +72,6 @@ class Results extends BaseResults * parameters passed to the object. * * @return void - * @tag NEW SEARCH */ protected function performSearch() { @@ -142,9 +140,8 @@ class Results extends BaseResults * @param Params $params Search parameters * * @return ParamBag - * @tag NEW SEARCH */ - protected function createBackendParameters (AbstractQuery $query, Params $params) + protected function createBackendParameters(AbstractQuery $query, Params $params) { $backendParams = new ParamBag(); @@ -211,7 +208,7 @@ class Results extends BaseResults * * @return void */ - protected function processSpelling (Spellcheck $spellcheck) + protected function processSpelling(Spellcheck $spellcheck) { $this->suggestions = array(); foreach ($spellcheck as $term => $info) { diff --git a/module/VuFind/src/VuFind/Search/Summon/Results.php b/module/VuFind/src/VuFind/Search/Summon/Results.php index 07e6f9ba05f..7fb5ea9ffec 100644 --- a/module/VuFind/src/VuFind/Search/Summon/Results.php +++ b/module/VuFind/src/VuFind/Search/Summon/Results.php @@ -134,9 +134,8 @@ class Results extends BaseResults * @param Params $params Search parameters * * @return ParamBag - * @tag NEW SEARCH */ - protected function createBackendParameters (Params $params) + protected function createBackendParameters(Params $params) { $backendParams = new ParamBag(); @@ -173,7 +172,7 @@ class Results extends BaseResults * * @return array */ - protected function createBackendFacetParameters ($facets) + protected function createBackendFacetParameters($facets) { $config = $this->getServiceLocator()->get('VuFind\Config')->get('Summon'); $defaultFacetLimit = isset($config->Facet_Settings->facet_limit) @@ -202,7 +201,7 @@ class Results extends BaseResults * * @return void */ - public function createBackendFilterParameters (ParamBag $params, $filterList) + public function createBackendFilterParameters(ParamBag $params, $filterList) { // Which filters should be applied to our query? if (!empty($filterList)) { diff --git a/module/VuFind/src/VuFind/Search/WorldCat/Results.php b/module/VuFind/src/VuFind/Search/WorldCat/Results.php index 29ad87229b2..3546555e9a2 100644 --- a/module/VuFind/src/VuFind/Search/WorldCat/Results.php +++ b/module/VuFind/src/VuFind/Search/WorldCat/Results.php @@ -102,7 +102,6 @@ class Results extends \VuFind\Search\Base\Results * @param Params $params Search parameters * * @return ParamBag - * @tag NEW SEARCH */ protected function createBackendParameters(AbstractQuery $query, Params $params) { diff --git a/module/VuFind/src/VuFindTest/Unit/TestCase.php b/module/VuFind/src/VuFindTest/Unit/TestCase.php index 7864c2b2c8b..b2373a93b30 100644 --- a/module/VuFind/src/VuFindTest/Unit/TestCase.php +++ b/module/VuFind/src/VuFindTest/Unit/TestCase.php @@ -61,7 +61,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase * * @return mixed */ - protected function callMethod ($object, $method, array $arguments = array()) + protected function callMethod($object, $method, array $arguments = array()) { $reflectionMethod = new \ReflectionMethod($object, $method); $reflectionMethod->setAccessible(true); @@ -80,7 +80,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase * * @return mixed */ - protected function getProperty ($object, $property) + protected function getProperty($object, $property) { $reflectionProperty = new \ReflectionProperty($object, $property); $reflectionProperty->setAccessible(true); @@ -100,7 +100,7 @@ abstract class TestCase extends \PHPUnit_Framework_TestCase * * @return void */ - protected function setProperty ($object, $property, $value) + protected function setProperty($object, $property, $value) { $reflectionProperty = new \ReflectionProperty($object, $property); $reflectionProperty->setAccessible(true); diff --git a/module/VuFind/tests/unit-tests/src/Config/Reader/CacheDecoratorTest.php b/module/VuFind/tests/unit-tests/src/Config/Reader/CacheDecoratorTest.php index 2baa4ee1213..636e30a55cd 100644 --- a/module/VuFind/tests/unit-tests/src/Config/Reader/CacheDecoratorTest.php +++ b/module/VuFind/tests/unit-tests/src/Config/Reader/CacheDecoratorTest.php @@ -48,7 +48,7 @@ class CacheDecoratorTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testFromFileAndString () + public function testFromFileAndString() { $cache = $this->getMockForAbstractClass('Zend\Cache\Storage\StorageInterface', array('setItem', 'hasItem')); $cache->expects($this->exactly(2)) @@ -73,7 +73,7 @@ class CacheDecoratorTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testFromFileAndStringCached () + public function testFromFileAndStringCached() { $cache = $this->getMockForAbstractClass('Zend\Cache\Storage\StorageInterface', array('setItem', 'hasItem', 'getItem')); $cache->expects($this->never()) diff --git a/module/VuFind/tests/unit-tests/src/Search/BackendManagerTest.php b/module/VuFind/tests/unit-tests/src/Search/BackendManagerTest.php index a72e133a80e..1468d67af2c 100644 --- a/module/VuFind/tests/unit-tests/src/Search/BackendManagerTest.php +++ b/module/VuFind/tests/unit-tests/src/Search/BackendManagerTest.php @@ -51,7 +51,7 @@ class BackendManagerTest extends TestCase * * @return void */ - public function testGetThrowsOnNonObject () + public function testGetThrowsOnNonObject() { $registry = $this->getMockForAbstractClass('Zend\ServiceManager\ServiceLocatorInterface'); $registry->expects($this->once()) @@ -69,7 +69,7 @@ class BackendManagerTest extends TestCase * * @return void */ - public function testGetThrowsOnNonBackend () + public function testGetThrowsOnNonBackend() { $registry = $this->getMockForAbstractClass('Zend\ServiceManager\ServiceLocatorInterface'); $registry->expects($this->once()) diff --git a/module/VuFind/tests/unit-tests/src/Search/Solr/MultiIndexListenerTest.php b/module/VuFind/tests/unit-tests/src/Search/Solr/MultiIndexListenerTest.php index c83e62d34c2..4b92ad8d9c7 100644 --- a/module/VuFind/tests/unit-tests/src/Search/Solr/MultiIndexListenerTest.php +++ b/module/VuFind/tests/unit-tests/src/Search/Solr/MultiIndexListenerTest.php @@ -120,7 +120,7 @@ class MultiIndexListenerTest extends TestCase * * @return void */ - protected function setup () + protected function setup() { $connector = new Connector('http://example.org/'); $this->backend = new Backend($connector); @@ -132,7 +132,7 @@ class MultiIndexListenerTest extends TestCase * * @return void */ - public function testStripFacetFields () + public function testStripFacetFields() { $params = new ParamBag( array( @@ -153,7 +153,7 @@ class MultiIndexListenerTest extends TestCase * * @return void */ - public function testStripSpecsEmptySpecs () + public function testStripSpecsEmptySpecs() { $this->setProperty($this->listener, 'specs', array()); $specs = $this->callMethod($this->listener, 'getSearchSpecs', array(array('A', 'B', 'E'))); @@ -165,7 +165,7 @@ class MultiIndexListenerTest extends TestCase * * @return void */ - public function testStripSpecsNoFieldsToStrip () + public function testStripSpecsNoFieldsToStrip() { $specs = $this->callMethod($this->listener, 'getSearchSpecs', array(array('F', 'G', 'H'))); $this->assertEquals($specs, self::$specs); @@ -176,7 +176,7 @@ class MultiIndexListenerTest extends TestCase * * @return void */ - public function testStripSpecsStrip () + public function testStripSpecsStrip() { $specs = $this->callMethod($this->listener, 'getSearchSpecs', array(array('A', 'B', 'E'))); $this->assertEquals( @@ -203,7 +203,7 @@ class MultiIndexListenerTest extends TestCase * * @return void */ - public function testStripSpecsAllQueryFields () + public function testStripSpecsAllQueryFields() { $specs = $this->callMethod($this->listener, 'getSearchSpecs', array(array('A', 'B', 'C', 'D', 'E'))); $this->assertEquals( diff --git a/module/VuFindHttp/Module.php b/module/VuFindHttp/Module.php index dae38443895..e906daa34bd 100644 --- a/module/VuFindHttp/Module.php +++ b/module/VuFindHttp/Module.php @@ -54,7 +54,7 @@ class Module * * @return array */ - public function getAutoloaderConfig () + public function getAutoloaderConfig() { return array( 'Zend\Loader\StandardAutoloader' => array( @@ -70,7 +70,7 @@ class Module * * @return array */ - public function getConfig () + public function getConfig() { return array(); } @@ -80,7 +80,7 @@ class Module * * @return void */ - public function init () + public function init() { } @@ -89,7 +89,7 @@ class Module * * @return array */ - public function getServiceConfig () + public function getServiceConfig() { return array( 'factories' => array( @@ -103,7 +103,7 @@ class Module * * @return \VuFind\Service\Search */ - public function setup () + public function setup() { $config = include realpath(__DIR__ . '/' . $this->configPath); diff --git a/module/VuFindHttp/src/VuFindHttp/HttpService.php b/module/VuFindHttp/src/VuFindHttp/HttpService.php index 49366ed0587..1a71f5695ff 100644 --- a/module/VuFindHttp/src/VuFindHttp/HttpService.php +++ b/module/VuFindHttp/src/VuFindHttp/HttpService.php @@ -86,7 +86,7 @@ class HttpService implements HttpServiceInterface * * @return Zend\Http\Client */ - public function proxify (\Zend\Http\Client $client, array $options = array()) + public function proxify(\Zend\Http\Client $client, array $options = array()) { if ($this->proxyConfig) { $host = $client->getUri()->getHost(); @@ -109,7 +109,7 @@ class HttpService implements HttpServiceInterface * * @return \Zend\Http\Response */ - public function get ($url, array $params = array(), $timeout = null) + public function get($url, array $params = array(), $timeout = null) { if ($params) { $query = $this->createQueryString($params); @@ -134,7 +134,7 @@ class HttpService implements HttpServiceInterface * * @return \Zend\Http\Response */ - public function post ($url, $body = null, $type = 'application/octet-stream', + public function post($url, $body = null, $type = 'application/octet-stream', $timeout = null ) { $client @@ -155,7 +155,7 @@ class HttpService implements HttpServiceInterface * * @return \Zend\Http\Response */ - public function postForm ($url, array $params = array(), $timeout = null) + public function postForm($url, array $params = array(), $timeout = null) { $body = $this->createQueryString($params); return $this->post($url, $body, \Zend\Http\Client::ENC_URLENCODED, $timeout); @@ -183,7 +183,7 @@ class HttpService implements HttpServiceInterface * * @return \Zend\Http\Client */ - public function createClient ($url = null, + public function createClient($url = null, $method = \Zend\Http\Request::METHOD_GET, $timeout = null ) { $client = new \Zend\Http\Client(); @@ -210,7 +210,7 @@ class HttpService implements HttpServiceInterface * * @return string */ - protected function createQueryString (array $params = array()) + protected function createQueryString(array $params = array()) { if ($this->isAssocParams($params)) { return http_build_query($params); @@ -229,7 +229,7 @@ class HttpService implements HttpServiceInterface * * @todo Catch more exceptions, maybe? */ - protected function send (\Zend\Http\Client $client) + protected function send(\Zend\Http\Client $client) { try { $response = $client->send(); @@ -250,7 +250,7 @@ class HttpService implements HttpServiceInterface * * @return boolean */ - public static function isAssocParams (array $array) + public static function isAssocParams(array $array) { foreach ($array as $key => $value) { if (!is_numeric($key)) { @@ -267,7 +267,7 @@ class HttpService implements HttpServiceInterface * * @return boolean */ - protected function isLocal ($host) + protected function isLocal($host) { return preg_match(self::LOCAL_ADDRESS_RE, $host); } diff --git a/module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php b/module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php index 8c7c323961a..77913f9bf4e 100644 --- a/module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php +++ b/module/VuFindHttp/src/VuFindHttp/HttpServiceAwareInterface.php @@ -48,5 +48,5 @@ interface HttpServiceAwareInterface * * @return void */ - public function setHttpService (HttpServiceInterface $service); + public function setHttpService(HttpServiceInterface $service); } \ No newline at end of file diff --git a/module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php b/module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php index b6e25e94e29..3a16da3fe1c 100644 --- a/module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php +++ b/module/VuFindHttp/src/VuFindHttp/HttpServiceInterface.php @@ -51,7 +51,7 @@ interface HttpServiceInterface * * @return Zend\Http\Client */ - public function proxify (\Zend\Http\Client $client, array $options = array()); + public function proxify(\Zend\Http\Client $client, array $options = array()); /** * Perform a GET request. @@ -62,7 +62,7 @@ interface HttpServiceInterface * * @return \Zend\Http\Response */ - public function get ($url, array $params = array(), $timeout = null); + public function get($url, array $params = array(), $timeout = null); /** * Perform a POST request. @@ -74,7 +74,7 @@ interface HttpServiceInterface * * @return \Zend\Http\Response */ - public function post ($url, $body = null, $type = 'application/octet-stream', + public function post($url, $body = null, $type = 'application/octet-stream', $timeout = null ); @@ -87,7 +87,7 @@ interface HttpServiceInterface * * @return \Zend\Http\Response */ - public function postForm ($url, array $params = array(), $timeout = null); + public function postForm($url, array $params = array(), $timeout = null); /** * Return a new proxy client. @@ -98,7 +98,7 @@ interface HttpServiceInterface * * @return \Zend\Http\Client */ - public function createClient ($url, $method = \Zend\Http\Request::METHOD_GET, + public function createClient($url, $method = \Zend\Http\Request::METHOD_GET, $timeout = null ); diff --git a/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php b/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php index 6072628503b..6cbd9031d89 100644 --- a/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php +++ b/module/VuFindHttp/tests/unit-tests/src/VuFindTest/HttpServiceTest.php @@ -70,7 +70,7 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testGetWithAssocParams () + public function testGetWithAssocParams() { $service = new Service(); $adapter = $this->getMock('Zend\Http\Client\Adapter\Test', array('write')); @@ -91,7 +91,7 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testGetWithParamPairs () + public function testGetWithParamPairs() { $service = new Service(); $adapter = $this->getMock('Zend\Http\Client\Adapter\Test', array('write')); @@ -112,7 +112,7 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testGetAppendsQueryPart () + public function testGetAppendsQueryPart() { $service = new Service(); $adapter = $this->getMock('Zend\Http\Client\Adapter\Test', array('write')); @@ -133,7 +133,7 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testPostForm () + public function testPostForm() { $service = new Service(); $adapter = new \Zend\Http\Client\Adapter\Test(); @@ -146,7 +146,7 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testSendPostRequestEmptyBody () + public function testSendPostRequestEmptyBody() { $service = new Service(); $adapter = $this->getMock('Zend\Http\Client\Adapter\Test', array('write')); @@ -167,7 +167,7 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testProxify () + public function testProxify() { $service = new Service( array( @@ -189,7 +189,7 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testNoProxifyLocal () + public function testNoProxifyLocal() { $service = new Service( array( @@ -216,7 +216,7 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testRuntimeException () + public function testRuntimeException() { $service = new Service(); $service->get('http://example.tld'); @@ -227,7 +227,7 @@ class ProxyServiceTest extends \PHPUnit_Framework_TestCase * * @return void */ - public function testIsAssocArrayWithMixedKeys () + public function testIsAssocArrayWithMixedKeys() { $arr = array(); $arr[] = 'foo'; diff --git a/module/VuFindSearch/Module.php b/module/VuFindSearch/Module.php index f2406e40d2f..4847a10d8cb 100644 --- a/module/VuFindSearch/Module.php +++ b/module/VuFindSearch/Module.php @@ -66,7 +66,7 @@ class Module * * @return array */ - public function getAutoloaderConfig () + public function getAutoloaderConfig() { return array( 'Zend\Loader\StandardAutoloader' => array( @@ -82,7 +82,7 @@ class Module * * @return array */ - public function getServiceConfig () + public function getServiceConfig() { return array( 'factories' => array( @@ -98,7 +98,7 @@ class Module * * @return SearchService */ - public function setup (ServiceManager $sm) + public function setup(ServiceManager $sm) { $service = new Service(); if ($sm->has('VuFind\Logger')) { @@ -106,5 +106,4 @@ class Module } return $service; } - } \ No newline at end of file diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php index b785cf06784..51a6982edb7 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/BackendTest.php @@ -52,7 +52,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @return void */ - public function testRetrieve () + public function testRetrieve() { $resp = $this->loadResponse('single-record'); $conn = $this->getMock('VuFindSearch\Backend\Solr\Connector', array('retrieve'), array('http://example.tld/')); @@ -75,7 +75,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @return void */ - public function testTerms () + public function testTerms() { $resp = $this->loadResponse('terms'); $conn = $this->getMock('VuFindSearch\Backend\Solr\Connector', array('query'), array('http://example.tld/')); @@ -96,7 +96,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @expectedException VuFindSearch\Exception\InvalidArgumentException */ - public function testInjectResponseWriterTrhownOnIncompabileResponseWriter () + public function testInjectResponseWriterTrhownOnIncompabileResponseWriter() { $conn = $this->getMock('VuFindSearch\Backend\Solr\Connector', array(), array('http://example.tld/')); $back = new Backend($conn); @@ -112,7 +112,7 @@ class BackendTest extends PHPUnit_Framework_TestCase * * @throws InvalidArgumentException Fixture files does not exist */ - protected function loadResponse ($fixture) + protected function loadResponse($fixture) { $file = realpath(sprintf('%s/solr/response/%s', PHPUNIT_SEARCH_FIXTURES, $fixture)); if (!is_string($file) || !file_exists($file) || !is_readable($file)) { diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php index dd536c3b3af..449b1f0b75c 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/ConnectorTest.php @@ -60,7 +60,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * * @return void */ - public function testRetrieve () + public function testRetrieve() { $conn = $this->createConnector('single-record'); $resp = $conn->retrieve('id'); @@ -74,7 +74,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * * @return void */ - public function testRetrieveMissingRecord () + public function testRetrieveMissingRecord() { $conn = $this->createConnector('no-match'); $resp = $conn->retrieve('id'); @@ -87,7 +87,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * @expectedException VuFindSearch\Backend\Exception\RemoteErrorException * @expectedExceptionCode 500 */ - public function testInternalServerError () + public function testInternalServerError() { $conn = $this->createConnector('internal-server-error'); $resp = $conn->retrieve('id'); @@ -99,7 +99,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * @expectedException VuFindSearch\Backend\Exception\RequestErrorException * @expectedExceptionCode 400 */ - public function testBadRequestError () + public function testBadRequestError() { $conn = $this->createConnector('bad-request'); $resp = $conn->retrieve('id'); @@ -111,7 +111,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * @expectedException InvalidArgumentException * @expectedExceptionMessage AdapterInterface */ - public function testSetAdapterThrowsInvalidObject () + public function testSetAdapterThrowsInvalidObject() { $conn = $this->createConnector('single-record'); $conn->setAdapter($this); @@ -123,7 +123,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * @expectedException InvalidArgumentException * @expectedExceptionMessage Unable to serialize */ - public function testSaveThrowsUnknownFormat () + public function testSaveThrowsUnknownFormat() { $conn = $this->createConnector(); $document = $this->getMock('VuFindSearch\Backend\Solr\Document\UpdateDocument'); @@ -139,7 +139,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * * @throws InvalidArgumentException Fixture file does not exist */ - protected function createConnector ($fixture = null) + protected function createConnector($fixture = null) { if ($fixture) { $file = realpath(sprintf('%s/solr/response/%s', PHPUNIT_SEARCH_FIXTURES, $fixture)); @@ -161,7 +161,7 @@ class ConnectorTest extends PHPUnit_Framework_TestCase * * @return void */ - public function proxify (HttpClient $client) + public function proxify(HttpClient $client) { $adapter = new TestAdapter(); $adapter->setResponse($this->response); diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/NamedListTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/NamedListTest.php index d8606da14b4..60ea5accaed 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/NamedListTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/NamedListTest.php @@ -48,7 +48,7 @@ class NamedListTest extends TestCase * * @return void */ - public function testIterate () + public function testIterate() { $list = new NamedList(array(array('first term', 'info'), array('second term', 'info'))); $keys = array(); @@ -63,7 +63,7 @@ class NamedListTest extends TestCase * * @return void */ - public function testCountable () + public function testCountable() { $list = new NamedList(array(array('first term', 'info'), array('second term', 'info'))); $this->assertEquals(2, count($list)); diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionFactoryTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionFactoryTest.php index 45198429e26..491ab07f39e 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionFactoryTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/RecordCollectionFactoryTest.php @@ -48,7 +48,7 @@ class RecordCollectionFactoryTest extends PHPUnit_Framework_TestCase * * @return void */ - public function testFactory () + public function testFactory() { $json = json_encode(array('response' => array('start' => 0, 'docs' => array(array(), array(), array())))); $fact = new RecordCollectionFactory(); diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/SpellcheckTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/SpellcheckTest.php index 9eaa68f26bf..c4acde2560d 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/SpellcheckTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/Response/Json/SpellcheckTest.php @@ -48,7 +48,7 @@ class SpellcheckTest extends TestCase * * @return void */ - public function testMerge () + public function testMerge() { $s1 = new Spellcheck( array( diff --git a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/SearchHandlerTest.php b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/SearchHandlerTest.php index 0e5e02c07b3..d596a7fe351 100644 --- a/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/SearchHandlerTest.php +++ b/module/VuFindSearch/tests/unit-tests/src/VuFindTest/Backend/Solr/SearchHandlerTest.php @@ -48,7 +48,7 @@ class SearchHandlerTest extends PHPUnit_Framework_TestCase * * @return void */ - public function testSimpleSearchDismax () + public function testSimpleSearchDismax() { $spec = array('DismaxParams' => array(array('foo', 'bar')), 'DismaxFields' => array('field1', 'field2')); $hndl = new SearchHandler($spec); -- GitLab