@@ -248,7 +248,7 @@ discard block |
||
248 | 248 | } |
249 | 249 | |
250 | 250 | foreach ($indices as $index) { |
251 | - $temporaryIndexName = 'tmp_' . $index->indexName; |
|
251 | + $temporaryIndexName = 'tmp_'.$index->indexName; |
|
252 | 252 | |
253 | 253 | /** @var Index $temporaryIndex */ |
254 | 254 | $temporaryIndex = $this->initIndex($temporaryIndexName); |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | { |
312 | 312 | $reflectionClass = new \ReflectionClass($class); |
313 | 313 | |
314 | - if (! $reflectionClass->implementsInterface(SearchableInterface::class)) { |
|
314 | + if ( ! $reflectionClass->implementsInterface(SearchableInterface::class)) { |
|
315 | 315 | throw new \InvalidArgumentException("The class: {$reflectionClass->name} doesn't implement leinonen\\Yii2Algolia\\SearchableInterface"); |
316 | 316 | } |
317 | 317 | } |
@@ -341,9 +341,9 @@ discard block |
||
341 | 341 | { |
342 | 342 | $indexNames = $searchableModel->getIndices(); |
343 | 343 | |
344 | - $indices = array_map(function ($indexName) { |
|
344 | + $indices = array_map(function($indexName) { |
|
345 | 345 | if ($this->env !== null) { |
346 | - $indexName = $this->env . '_' . $indexName; |
|
346 | + $indexName = $this->env.'_'.$indexName; |
|
347 | 347 | } |
348 | 348 | |
349 | 349 | return $this->initIndex($indexName); |
@@ -366,9 +366,9 @@ discard block |
||
366 | 366 | $arrayType = $this->getClassName($searchableModels[0]); |
367 | 367 | $indices = $this->initIndices($this->factory->makeSearchableObject($arrayType)); |
368 | 368 | |
369 | - $algoliaRecords = array_map(function ($searchableModel) use ($arrayType) { |
|
369 | + $algoliaRecords = array_map(function($searchableModel) use ($arrayType) { |
|
370 | 370 | /** @var $searchableModel SearchableInterface */ |
371 | - if (! $searchableModel instanceof $arrayType) { |
|
371 | + if ( ! $searchableModel instanceof $arrayType) { |
|
372 | 372 | throw new \InvalidArgumentException('The given array should not contain multiple different classes'); |
373 | 373 | } |
374 | 374 |