diff --git a/module/VuFind/src/VuFind/Bootstrapper.php b/module/VuFind/src/VuFind/Bootstrapper.php index cc2d955a17742fd983df28428193f505c46a00d9..1987b733250ac7a68e3556587be0c0015f6bffa4 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 380f5f6254c02e54d52550b15204e0169d2478b0..ae435dd87bdc68bfe015649a0eede19860d092ad 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 44bd158231bab0904bc6c6a7b58466b28774d444..35630a080ba74029350d8c3d0e7da2cd022a2e54 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 1ef87c0b1670d29dc235eff8100fcddbcd98927a..486a2f496bd4917a9a4ba750a6770f1ce6cc4420 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 904accb3ba97f25efd608715c54fe72c078119ff..0794a429c031cfb8fc972167a3411e73b888323e 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 9f40d387101f7207709d295515b1d85027f255a5..c8e707a8398973d9b9b69ed9f5f83df754e65845 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 5ac0a269578131f3f4ef67c4f546a2d65277fb54..304a6f367f06e1e45e148327e6e720fd45797f83 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 07e6f9ba05fe17cebdb66d0104eea4a83145ebb8..7fb5ea9ffecd991578946a6124a3278c888c1c0d 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 29ad87229b2347824d3e430851bb3c51a1135c83..3546555e9a2dbb519534c9517a412014de8d764a 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 7864c2b2c8b7cf0bb65434bbed8f3040e835f589..b2373a93b3088c740a62ca09c423fd50a8a3833d 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 2baa4ee121316d56981632fd5a99c99b1b8a6b1d..636e30a55cdc7cbe2b14e830704e79913e0bdd17 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 a72e133a80ec7ff488d3caec39c92ce37989223f..1468d67af2c252ece9f587378993b33c3bfc87e9 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 c83e62d34c22562b911470849e59f761d202f718..4b92ad8d9c759c90ba6e0346f1bdcd1c517e368e 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 dae3844389535a4f87705f0c0a96602cef9c3b64..e906daa34bd49696e19ced217727133f62881f50 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 49366ed05873a3386518166ba88c4eeeabba234e..1a71f5695ffea3dd10967073204b727b6f5b6ac3 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 8c7c323961a51e6855a16216cbf4f0e8ce09f4a7..77913f9bf4e326bc0a132fbb37d6262b08cbc5bc 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 b6e25e94e294c76470afb8b2ce3d5d33067cd0a3..3a16da3fe1cfe0c5b05c0297b7e4df14dce1ba49 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 6072628503b50584da24887843f6398f1b1d8998..6cbd9031d89b25636f70783a57966c0ab809124f 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 f2406e40d2fa37a1aa73088e11643ff745aef0b8..4847a10d8cbdc64b48a36ff9be08b6555cf6a371 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 b785cf067845c4b21f13a0e9bfe73127af5bf1f0..51a6982edb79695d6bfe1ecebef05aaffdb9c8b1 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 dd536c3b3afa496708438e458671c0bbc4b04209..449b1f0b75c10635f4978ce433788238548873ee 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 d8606da14b4347e75b717f2c6cae92c5dc8cd877..60ea5accaed7e6949f7a1dcde803dcc61da6527a 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 45198429e26b77934fb3d9586ce0f66b9cae60df..491ab07f39e23b0669aa80dd42c308ad11e1673a 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 9eaa68f26bf8101ff122aa7a4a8536d94044e793..c4acde2560de9aa37a3025480e0972f04837ce8b 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 0e5e02c07b3ee51a7eb5a8102d44e61060151561..d596a7fe3513c7955b7179388e7d110420f1e1c7 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);