Completed
Push — master ( a42b47...a111ac )
by Florian
03:12
created
Services/DummySearchService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 		$id = $document->getEntityClass();
27 27
 		$id .= '#';
28 28
 		$entityId = $document->getEntityId();
29
-		if(is_scalar($entityId)) {
29
+		if (is_scalar($entityId)) {
30 30
 			$id .= $entityId;
31 31
 		} else {
32 32
 			$id .= md5(serialize($entityId));
@@ -72,15 +72,15 @@  discard block
 block discarded – undo
72 72
 	 */
73 73
 	public function autocomplete($search, $maxResults = 10) {
74 74
 		$words = array();
75
-		foreach($this->index as $doc) {
76
-			foreach($doc->getFields() as $content) {
77
-				if(is_string($content)) {
75
+		foreach ($this->index as $doc) {
76
+			foreach ($doc->getFields() as $content) {
77
+				if (is_string($content)) {
78 78
 					$words = array_merge($words, explode(' ', $content));
79 79
 				}
80 80
 			}
81 81
 		}
82 82
 		
83
-		return array_filter($words, function ($word) use ($search) {
83
+		return array_filter($words, function($word) use ($search) {
84 84
 			return stripos($word, $search) === 0;
85 85
 		});
86 86
 	}
Please login to merge, or discard this patch.
Tests/Fixtures/ORM/Car.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@
 block discarded – undo
51 51
 	 *
52 52
 	 * @see \StingerSoft\EntitySearchBundle\Model\SearchableEntity::indexEntity()
53 53
 	 */
54
-	public function indexEntity(Document &$document) {
54
+	public function indexEntity(Document&$document) {
55 55
 		$document->addField(Document::FIELD_TITLE, $this->getTitle());
56 56
 		return true;
57 57
 	}
Please login to merge, or discard this patch.