Completed
Push — master ( 9c70af...9a62eb )
by Nuno
26:58 queued 23:26
created
src/Searchable/AggregatorCollection.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
     {
43 43
         $this->aggregator = get_class($this->first());
44 44
 
45
-        $this->items = $this->getSerializedPropertyValue(EloquentCollection::make($this->map(function ($aggregator) {
45
+        $this->items = $this->getSerializedPropertyValue(EloquentCollection::make($this->map(function($aggregator) {
46 46
             return $aggregator->getModel();
47 47
         })));
48 48
 
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     public function __wakeup()
58 58
     {
59
-        $this->items = $this->getRestoredPropertyValue($this->items)->map(function ($model) {
59
+        $this->items = $this->getRestoredPropertyValue($this->items)->map(function($model) {
60 60
             return $this->aggregator::create($model);
61 61
         })->toArray();
62 62
     }
Please login to merge, or discard this patch.
src/ScoutExtendedServiceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -58,30 +58,30 @@  discard block
 block discarded – undo
58 58
      */
59 59
     private function registerBinds(): void
60 60
     {
61
-        $this->app->bind(Algolia::class, function () {
61
+        $this->app->bind(Algolia::class, function() {
62 62
             return new Algolia($this->app);
63 63
         });
64 64
 
65 65
         $this->app->alias(Algolia::class, 'algolia');
66 66
 
67
-        $this->app->singleton(EngineManager::class, function ($app) {
67
+        $this->app->singleton(EngineManager::class, function($app) {
68 68
             return new EngineManager($app);
69 69
         });
70 70
 
71 71
         $this->app->alias(EngineManager::class, \Laravel\Scout\EngineManager::class);
72 72
 
73
-        $this->app->bind(AlgoliaEngine::class, function (): AlgoliaEngine {
73
+        $this->app->bind(AlgoliaEngine::class, function(): AlgoliaEngine {
74 74
             return $this->app->make(\Laravel\Scout\EngineManager::class)->createAlgoliaDriver();
75 75
         });
76 76
 
77 77
         $this->app->alias(AlgoliaEngine::class, 'algolia.engine');
78
-        $this->app->bind(SearchClient::class, function (): SearchClient {
78
+        $this->app->bind(SearchClient::class, function(): SearchClient {
79 79
             return $this->app->make('algolia.engine')->getClient();
80 80
         });
81 81
 
82 82
         $this->app->alias(SearchClient::class, 'algolia.client');
83 83
 
84
-        $this->app->bind(AnalyticsClient::class, function (): AnalyticsClient {
84
+        $this->app->bind(AnalyticsClient::class, function(): AnalyticsClient {
85 85
             return AnalyticsClient::create(config('scout.algolia.id'), config('scout.algolia.secret'));
86 86
         });
87 87
 
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
      */
119 119
     private function registerMacros(): void
120 120
     {
121
-        \Illuminate\Database\Eloquent\Builder::macro('transform', function (array $array, array $transformers = null) {
121
+        \Illuminate\Database\Eloquent\Builder::macro('transform', function(array $array, array $transformers = null) {
122 122
             foreach ($transformers ?? UpdateJob::getTransformers() as $transformer) {
123 123
                 $array = app($transformer)->transform($this->getModel(), $array);
124 124
             }
Please login to merge, or discard this patch.
src/Engines/AlgoliaEngine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -108,7 +108,7 @@
 block discarded – undo
108 108
     {
109 109
         $operators = ['<', '<=', '=', '!=', '>=', '>', ':'];
110 110
 
111
-        return collect($builder->wheres)->map(function ($value, $key) use ($operators) {
111
+        return collect($builder->wheres)->map(function($value, $key) use ($operators) {
112 112
             if (ends_with($key, $operators) || starts_with($value, $operators)) {
113 113
                 return $key.' '.$value;
114 114
             }
Please login to merge, or discard this patch.
src/Jobs/UpdateJob.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 continue;
107 107
             }
108 108
 
109
-            if (! $this->hasToSearchableArray($searchable)) {
109
+            if ( ! $this->hasToSearchableArray($searchable)) {
110 110
                 $array = $searchable->getModel()->transform($array);
111 111
             }
112 112
 
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
     {
146 146
         $class = get_class($searchable->getModel());
147 147
 
148
-        if (! array_key_exists($class, $this->splittables)) {
148
+        if ( ! array_key_exists($class, $this->splittables)) {
149 149
             $this->splittables[$class] = false;
150 150
 
151 151
             foreach ($searchable->toSearchableArray() as $key => $value) {
@@ -202,7 +202,7 @@  discard block
 block discarded – undo
202 202
             $objects = $temp;
203 203
         }
204 204
 
205
-        return array_map(function ($object) use ($array) {
205
+        return array_map(function($object) use ($array) {
206 206
             return array_merge($array, $object);
207 207
         }, $objects);
208 208
     }
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
     {
229 229
         $searchableClass = get_class($searchable);
230 230
 
231
-        if (! array_key_exists($searchableClass, $this->searchablesWithToSearchableArray)) {
231
+        if ( ! array_key_exists($searchableClass, $this->searchablesWithToSearchableArray)) {
232 232
             $reflectionClass = new ReflectionClass(get_class($searchable));
233 233
 
234 234
             $this->searchablesWithToSearchableArray[$searchableClass] =
Please login to merge, or discard this patch.
src/Console/Commands/StatusCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 
60 60
             $status = $synchronizer->analyse($index);
61 61
             $description = $status->toHumanString();
62
-            if (! $status->bothAreEqual()) {
62
+            if ( ! $status->bothAreEqual()) {
63 63
                 $description = "<fg=red>$description</>";
64 64
             } else {
65 65
                 $description = '<fg=green>Synchronized</>';
Please login to merge, or discard this patch.
src/Searchable/ModelsResolver.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
         foreach ($ids as $id) {
43 43
             $modelClass = ObjectIdEncrypter::decryptSearchable($id);
44 44
             $modelKey = ObjectIdEncrypter::decryptSearchableKey($id);
45
-            if (! array_key_exists($modelClass, $models)) {
45
+            if ( ! array_key_exists($modelClass, $models)) {
46 46
                 $models[$modelClass] = [];
47 47
             }
48 48
 
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             $model = new $modelClass;
54 54
 
55 55
             if (in_array(Searchable::class, class_uses_recursive($model), true)) {
56
-                if (! empty($models = $model->getScoutModelsByIds($builder, $modelKeys))) {
56
+                if ( ! empty($models = $model->getScoutModelsByIds($builder, $modelKeys))) {
57 57
                     $instances = $instances->merge($models);
58 58
                 }
59 59
             } else {
Please login to merge, or discard this patch.
src/Console/Commands/OptimizeCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
         foreach ($searchableFinder->fromCommand($this) as $searchable) {
47 47
             $this->output->text('
Please login to merge, or discard this patch.