Test Failed
Pull Request — develop (#34)
by Nuno
06:29 queued 03:34
created
src/Settings/Compiler.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 
85 85
         $indexChangedSettings = [];
86 86
         foreach ($settings->changed() as $setting => $value) {
87
-            if (! array_key_exists($setting, $viewParams)) {
87
+            if ( ! array_key_exists($setting, $viewParams)) {
88 88
                 $indexChangedSettings[$setting] = $value;
89 89
             }
90 90
         }
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
         array_pop($matches[2]);
117 117
 
118
-        return array_map(function ($match) {
118
+        return array_map(function($match) {
119 119
             return ltrim(explode(' ', $match)[0], '$');
120 120
         }, $matches[2]);
121 121
     }
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
@@ -62,7 +62,7 @@
 block discarded – undo
62 62
 
63 63
             $status = $synchronizer->analyse($index);
64 64
             $description = $status->toHumanString();
65
-            if (! $status->bothAreEqual()) {
65
+            if ( ! $status->bothAreEqual()) {
66 66
                 $description = "<fg=red>$description</>";
67 67
             } else {
68 68
                 $description = '<fg=green>synchronized</>';
Please login to merge, or discard this patch.
src/Helpers/SearchableFinder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@
 block discarded – undo
75 75
     {
76 76
         $appNamespace = $this->app->getNamespace();
77 77
 
78
-        return array_values(array_filter($this->getProjectClasses(), function (string $class) use ($appNamespace) {
78
+        return array_values(array_filter($this->getProjectClasses(), function(string $class) use ($appNamespace) {
79 79
             return Str::startsWith($class, $appNamespace) && $this->isSearchableModel($class);
80 80
         }));
81 81
     }
Please login to merge, or discard this patch.
src/BuilderMacros.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
          *
33 33
          * @return int
34 34
          */
35
-        return function (): int {
35
+        return function(): int {
36 36
             $raw = $this->engine()->search($this);
37 37
 
38 38
             return array_key_exists('nbHits', $raw) ? (int) $raw['nbHits'] : 0;
@@ -54,9 +54,9 @@  discard block
 block discarded – undo
54 54
          *
55 55
          * @return \Laravel\Scout\Builder
56 56
          */
57
-        return function (float $lat, float $lng): Builder {
57
+        return function(float $lat, float $lng): Builder {
58 58
             $callback = $this->callback;
59
-            $this->callback = function ($algolia, $query, $options) use ($lat, $lng, $callback) {
59
+            $this->callback = function($algolia, $query, $options) use ($lat, $lng, $callback) {
60 60
                 $options['aroundLatLng'] = (float) $lat.','.(float) $lng;
61 61
                 if ($callback) {
62 62
                     return call_user_func($callback, $algolia, $query, $options);
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
          *
82 82
          * @return \Laravel\Scout\Builder
83 83
          */
84
-        return function (array $options): Builder {
84
+        return function(array $options): Builder {
85 85
             $callback = $this->callback;
86 86
 
87
-            $this->callback = function ($algolia, $query, $baseOptions) use ($options, $callback) {
87
+            $this->callback = function($algolia, $query, $baseOptions) use ($options, $callback) {
88 88
                 $options = array_merge($options, $baseOptions);
89 89
 
90 90
                 if ($callback) {
Please login to merge, or discard this patch.
src/ScoutExtendedServiceProvider.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,19 +60,19 @@  discard block
 block discarded – undo
60 60
      */
61 61
     private function registerBinds(): void
62 62
     {
63
-        $this->app->bind(Algolia::class, function () {
63
+        $this->app->bind(Algolia::class, function() {
64 64
             return new Algolia($this->app);
65 65
         });
66 66
 
67 67
         $this->app->alias(Algolia::class, 'algolia');
68 68
 
69
-        $this->app->bind(AlgoliaEngine::class, function (): AlgoliaEngine {
69
+        $this->app->bind(AlgoliaEngine::class, function(): AlgoliaEngine {
70 70
             return $this->app->make(EngineManager::class)->createAlgoliaDriver();
71 71
         });
72 72
 
73 73
         $this->app->alias(AlgoliaEngine::class, 'algolia.engine');
74 74
 
75
-        $this->app->bind(ClientInterface::class, function (): ClientInterface {
75
+        $this->app->bind(ClientInterface::class, function(): ClientInterface {
76 76
             $engine = $this->app->make('algolia.engine');
77 77
             $reflection = new ReflectionClass(AlgoliaEngine::class);
78 78
             $property = $reflection->getProperty('algolia');
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
         $this->app->alias(ClientInterface::class, 'algolia.client');
85 85
 
86
-        $this->app->bind(Analytics::class, function (): Analytics {
86
+        $this->app->bind(Analytics::class, function(): Analytics {
87 87
             return Analytics::create(config('scout.algolia.id'), config('scout.algolia.secret'));
88 88
         });
89 89
 
Please login to merge, or discard this patch.
src/Searchable/RecordsCounter.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
         } else {
38 38
             $softDeletes = in_array(SoftDeletes::class, class_uses_recursive($searchable), true) && config('scout.soft_delete', false);
39 39
 
40
-            $count = $searchable::query()->when($softDeletes, function ($query) {
40
+            $count = $searchable::query()->when($softDeletes, function($query) {
41 41
                 $query->withTrashed();
42 42
             })->count();
43 43
         }
Please login to merge, or discard this patch.
src/Searchable/AggregatorObserver.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     public function setAggregator(string $aggregator, array $models): void
40 40
     {
41 41
         foreach ($models as $model) {
42
-            if (! array_key_exists($model, $this->aggregators)) {
42
+            if ( ! array_key_exists($model, $this->aggregators)) {
43 43
                 $this->aggregators[$model] = [];
44 44
             }
45 45
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
     {
55 55
         $class = get_class($model);
56 56
 
57
-        if (! array_key_exists($class, $this->aggregators)) {
57
+        if ( ! array_key_exists($class, $this->aggregators)) {
58 58
             return;
59 59
         }
60 60
 
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
         } else {
78 78
             $class = get_class($model);
79 79
 
80
-            if (! array_key_exists($class, $this->aggregators)) {
80
+            if ( ! array_key_exists($class, $this->aggregators)) {
81 81
                 return;
82 82
             }
83 83
 
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
         $class = get_class($model);
103 103
 
104
-        if (! array_key_exists($class, $this->aggregators)) {
104
+        if ( ! array_key_exists($class, $this->aggregators)) {
105 105
             return;
106 106
         }
107 107
 
Please login to merge, or discard this patch.
src/Settings/Settings.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
             }
73 73
         }
74 74
 
75
-        return array_filter($settings, function ($value, $setting) {
75
+        return array_filter($settings, function($value, $setting) {
76 76
             return ! in_array($setting, self::$ignore, true);
77 77
         }, ARRAY_FILTER_USE_BOTH);
78 78
     }
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
      */
85 85
     public function changed(): array
86 86
     {
87
-        return array_filter($this->all(), function ($value, $setting) {
87
+        return array_filter($this->all(), function($value, $setting) {
88 88
             return ! array_key_exists($setting, $this->defaults) || $value !== $this->defaults[$setting];
89 89
         }, ARRAY_FILTER_USE_BOTH);
90 90
     }
@@ -99,7 +99,7 @@  discard block
 block discarded – undo
99 99
         $viewVariables = Compiler::getViewVariables();
100 100
         $changed = $this->changed();
101 101
 
102
-        $compiled = array_filter($this->all(), function ($value, $setting) use ($viewVariables, $changed) {
102
+        $compiled = array_filter($this->all(), function($value, $setting) use ($viewVariables, $changed) {
103 103
             return in_array($setting, $viewVariables, true) || array_key_exists($setting, $changed);
104 104
         }, ARRAY_FILTER_USE_BOTH);
105 105
 
Please login to merge, or discard this patch.
src/Engines/AlgoliaEngine.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,11 +30,11 @@
 block discarded – undo
30 30
 
31 31
         $searchables = $searchable->getScoutModelsByIds(
32 32
             $builder, collect($results['hits'])->pluck('objectID')->values()->all()
33
-        )->keyBy(function ($searchable) {
33
+        )->keyBy(function($searchable) {
34 34
             return $searchable->getScoutKey();
35 35
         })->map->getModel();
36 36
 
37
-        return collect($results['hits'])->map(function ($hit) use ($searchables) {
37
+        return collect($results['hits'])->map(function($hit) use ($searchables) {
38 38
             if (isset($searchables[$hit['objectID']])) {
39 39
                 return $searchables[$hit['objectID']];
40 40
             }
Please login to merge, or discard this patch.