Merge pull request #105 from helpfulrobot/convert-to-psr-2

Converted to PSR-2
This commit is contained in:
Damian Mooyman 2015-12-18 10:05:41 +13:00
commit db4d73a5b1
2 changed files with 16 additions and 16 deletions

View File

@ -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);
}

View File

@ -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()
);
}