@@ -51,12 +51,12 @@ discard block |
||
| 51 | 51 | |
| 52 | 52 | if (is_array($subject) || $subject instanceof Traversable) { |
| 53 | 53 | $searchIndexPayload = collect($subject) |
| 54 | - ->each(function ($item) { |
|
| 54 | + ->each(function($item) { |
|
| 55 | 55 | if (!$item instanceof Searchable) { |
| 56 | 56 | throw new InvalidArgumentException; |
| 57 | 57 | } |
| 58 | 58 | }) |
| 59 | - ->map(function ($item) { |
|
| 59 | + ->map(function($item) { |
|
| 60 | 60 | return array_merge( |
| 61 | 61 | $item->getSearchableBody(), |
| 62 | 62 | ['objectID' => $this->getAlgoliaId($item)] |
@@ -91,7 +91,7 @@ discard block |
||
| 91 | 91 | */ |
| 92 | 92 | public function removeFromIndexByTypeAndId($type, $id) |
| 93 | 93 | { |
| 94 | - $this->index->deleteObject($type . '-' . $id); |
|
| 94 | + $this->index->deleteObject($type.'-'.$id); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | 97 | /** |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | */ |
| 140 | 140 | protected function getAlgoliaId($subject) |
| 141 | 141 | { |
| 142 | - return $subject->getSearchableType() . '-' . $subject->getSearchableId(); |
|
| 142 | + return $subject->getSearchableType().'-'.$subject->getSearchableId(); |
|
| 143 | 143 | } |
| 144 | 144 | |
| 145 | 145 | /** |
@@ -53,12 +53,12 @@ |
||
| 53 | 53 | |
| 54 | 54 | |
| 55 | 55 | $searchableItems = collect($subject) |
| 56 | - ->each(function ($item) { |
|
| 56 | + ->each(function($item) { |
|
| 57 | 57 | if (!$item instanceof Searchable) { |
| 58 | 58 | throw new InvalidArgumentException; |
| 59 | 59 | } |
| 60 | 60 | }) |
| 61 | - ->flatMap(function ($item) { |
|
| 61 | + ->flatMap(function($item) { |
|
| 62 | 62 | return |
| 63 | 63 | [ |
| 64 | 64 | [ |