From f87690ef225843d5f636c4c74cd59a4d28bb0dcb Mon Sep 17 00:00:00 2001 From: helpfulrobot Date: Fri, 18 Dec 2015 07:16:09 +1300 Subject: [PATCH] Converted to PSR-2 --- code/search/SearchIndex.php | 2 +- tests/SolrIndexTest.php | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/code/search/SearchIndex.php b/code/search/SearchIndex.php index ad9a56a..817c109 100644 --- a/code/search/SearchIndex.php +++ b/code/search/SearchIndex.php @@ -292,7 +292,7 @@ abstract class SearchIndex extends ViewableData if (preg_match('/^(\w+)\(/', $type, $match)) { $type = $match[1]; } - list($type, $args) = Object::parse_class_spec($type); + list($type, $args) = Object::parse_class_spec($type); if (is_subclass_of($type, 'StringField')) { $this->addFulltextField($field); } diff --git a/tests/SolrIndexTest.php b/tests/SolrIndexTest.php index 9984798..3864275 100644 --- a/tests/SolrIndexTest.php +++ b/tests/SolrIndexTest.php @@ -120,9 +120,9 @@ class SolrIndexTest extends SapphireTest ->search( '+term', \Hamcrest_Matchers::anything(), - \Hamcrest_Matchers::anything(), + \Hamcrest_Matchers::anything(), $matcher, - \Hamcrest_Matchers::anything() + \Hamcrest_Matchers::anything() ); } @@ -131,11 +131,11 @@ class SolrIndexTest extends SapphireTest $serviceMock = $this->getServiceMock(); Phockito::when($serviceMock)->search( \Hamcrest_Matchers::anything(), - \Hamcrest_Matchers::anything(), - \Hamcrest_Matchers::anything(), - \Hamcrest_Matchers::anything(), - \Hamcrest_Matchers::anything() - )->return($this->getFakeRawSolrResponse()); + \Hamcrest_Matchers::anything(), + \Hamcrest_Matchers::anything(), + \Hamcrest_Matchers::anything(), + \Hamcrest_Matchers::anything() + )->return($this->getFakeRawSolrResponse()); $index = new SolrIndexTest_FakeIndex(); $index->setService($serviceMock); @@ -151,10 +151,10 @@ class SolrIndexTest extends SapphireTest Phockito::verify( $serviceMock)->search( '+(Field1:term^1.5 OR HasOneObject_Field1:term^3)', - \Hamcrest_Matchers::anything(), - \Hamcrest_Matchers::anything(), - \Hamcrest_Matchers::not(\Hamcrest_Matchers::hasKeyInArray('hl.q')), - \Hamcrest_Matchers::anything() + \Hamcrest_Matchers::anything(), + \Hamcrest_Matchers::anything(), + \Hamcrest_Matchers::not(\Hamcrest_Matchers::hasKeyInArray('hl.q')), + \Hamcrest_Matchers::anything() ); // Search with highlighting @@ -168,10 +168,10 @@ class SolrIndexTest extends SapphireTest Phockito::verify( $serviceMock)->search( '+(Field1:term^1.5 OR HasOneObject_Field1:term^3)', - \Hamcrest_Matchers::anything(), - \Hamcrest_Matchers::anything(), - \Hamcrest_Matchers::hasKeyInArray('hl.q'), - \Hamcrest_Matchers::anything() + \Hamcrest_Matchers::anything(), + \Hamcrest_Matchers::anything(), + \Hamcrest_Matchers::hasKeyInArray('hl.q'), + \Hamcrest_Matchers::anything() ); }