@@ -32,7 +32,9 @@ |
||
| 32 | 32 | * @see \StingerSoft\EntitySearchBundle\Services\SearchService::setObjectManager() |
| 33 | 33 | */ |
| 34 | 34 | public function setObjectManager(ObjectManager $om) { |
| 35 | - if($this->objectManager) return; |
|
| 35 | + if($this->objectManager) { |
|
| 36 | + return; |
|
| 37 | + } |
|
| 36 | 38 | $this->objectManager = $om; |
| 37 | 39 | } |
| 38 | 40 | |
@@ -16,7 +16,6 @@ |
||
| 16 | 16 | use StingerSoft\EntitySearchBundle\Model\ResultSetAdapter; |
| 17 | 17 | use StingerSoft\EntitySearchBundle\Model\Result\FacetSetAdapter; |
| 18 | 18 | use StingerSoft\EntitySearchBundle\Model\Result\FacetSet; |
| 19 | -use StingerSoft\EntitySearchBundle\Model\Result\FacetAdapter; |
|
| 20 | 19 | |
| 21 | 20 | class DummySearchService extends AbstractSearchService { |
| 22 | 21 | |
@@ -89,12 +89,14 @@ |
||
| 89 | 89 | * @return boolean|Document Returns false if no document could be created |
| 90 | 90 | */ |
| 91 | 91 | public function createDocument(ObjectManager $manager, $object) { |
| 92 | - if(!$this->isIndexable($object)) |
|
| 93 | - return false; |
|
| 92 | + if(!$this->isIndexable($object)) { |
|
| 93 | + return false; |
|
| 94 | + } |
|
| 94 | 95 | $document = $this->getSearchService($manager)->createEmptyDocumentFromEntity($object); |
| 95 | 96 | $index = $this->fillDocument($document, $object); |
| 96 | - if($index == false) |
|
| 97 | - return false; |
|
| 97 | + if($index == false) { |
|
| 98 | + return false; |
|
| 99 | + } |
|
| 98 | 100 | |
| 99 | 101 | return $document; |
| 100 | 102 | } |