Passed
Push — analysis-q1L7bN ( 910041 )
by Nuno
15:03 queued 06:31
created
src/Jobs/UpdateJob.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
     {
120 120
         $class = get_class($searchable->getModel());
121 121
 
122
-        if (! array_key_exists($class, $this->splittables)) {
122
+        if ( ! array_key_exists($class, $this->splittables)) {
123 123
             $this->splittables[$class] = false;
124 124
 
125 125
             foreach ($searchable->toSearchableArray() as $key => $value) {
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
             $objects = $temp;
177 177
         }
178 178
 
179
-        return array_map(function ($object) use ($array) {
179
+        return array_map(function($object) use ($array) {
180 180
             return array_merge($array, $object);
181 181
         }, $objects);
182 182
     }
Please login to merge, or discard this patch.
src/Searchable/Aggregator.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -150,8 +150,7 @@  discard block
 block discarded – undo
150 150
             throw new ModelNotDefinedInAggregatorException();
151 151
         }
152 152
 
153
-        return method_exists($this->model, 'toSearchableArray') ? $this->model->toSearchableArray() :
154
-            $this->model->toArray();
153
+        return method_exists($this->model, 'toSearchableArray') ? $this->model->toSearchableArray() : $this->model->toArray();
155 154
     }
156 155
 
157 156
     /**
@@ -167,10 +166,10 @@  discard block
 block discarded – undo
167 166
             $softDeletes =
168 167
                 in_array(SoftDeletes::class, class_uses_recursive($model)) && config('scout.soft_delete', false);
169 168
 
170
-            $instance->newQuery()->when($softDeletes, function ($query) {
169
+            $instance->newQuery()->when($softDeletes, function($query) {
171 170
                 $query->withTrashed();
172
-            })->orderBy($instance->getKeyName())->chunk(config('scout.chunk.searchable', 500), function ($models) {
173
-                $models = $models->map(function ($model) {
171
+            })->orderBy($instance->getKeyName())->chunk(config('scout.chunk.searchable', 500), function($models) {
172
+                $models = $models->map(function($model) {
174 173
                     return static::create($model);
175 174
                 })->filter->shouldBeSearchable();
176 175
 
@@ -192,7 +191,7 @@  discard block
 block discarded – undo
192 191
             $softDeletes =
193 192
                 in_array(SoftDeletes::class, class_uses_recursive($model), true) && config('scout.soft_delete', false);
194 193
 
195
-            $count += $model::query()->when($softDeletes, function ($query) {
194
+            $count += $model::query()->when($softDeletes, function($query) {
196 195
                 $query->withTrashed();
197 196
             })->count();
198 197
         }
Please login to merge, or discard this patch.
src/Console/Commands/ImportCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -41,7 +41,7 @@
 block discarded – undo
41 41
         foreach ($searchableFinder->fromCommand($this) as $searchable) {
42 42
             $this->call('scout:flush', ['searchable' => $searchable]);
43 43
 
44
-            $events->listen(ModelsImported::class, function ($event) use ($searchable) {
44
+            $events->listen(ModelsImported::class, function($event) use ($searchable) {
45 45
                 $last = ObjectIdEncrypter::encrypt($event->models->last());
46 46
 
47 47
                 $this->line('<comment>Imported ['.$searchable.'] models up to ID:</comment> '.$last);
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
@@ -110,7 +110,7 @@
 block discarded – undo
110 110
 
111 111
         $wheres = $this->mutateWheres($builder->wheres);
112 112
 
113
-        return collect($wheres)->map(function ($value, $key) use ($operators) {
113
+        return collect($wheres)->map(function($value, $key) use ($operators) {
114 114
             if (ends_with($key, $operators) || starts_with($value, $operators)) {
115 115
                 return $key.' '.$value;
116 116
             }
Please login to merge, or discard this patch.
src/Builder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
     {
44 44
         $callback = $this->callback;
45 45
 
46
-        $this->callback = function ($algolia, $query, $baseParameters) use ($parameters, $callback) {
46
+        $this->callback = function($algolia, $query, $baseParameters) use ($parameters, $callback) {
47 47
             $parameters = array_merge($parameters, $baseParameters);
48 48
 
49 49
             if (is_callable($callback)) {
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.