Passed
Push — master ( 355fe7...2f973f )
by Christopher
05:14
created
src/Business/Mapping/Compiler.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -472,7 +472,7 @@
 block discarded – undo
472 472
             if ($field instanceof Fluent && !is_null($field->type)) {
473 473
                 $method = 'compile' . ucfirst($this->camelize($field->type));
474 474
                 if (method_exists($this, $method)) {
475
-                    $statements[$field->name] = (array)$this->$method($field);
475
+                    $statements[$field->name] = (array) $this->$method($field);
476 476
                 }
477 477
             }
478 478
         }
Please login to merge, or discard this patch.
src/Business/Mapping/Mapper.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
         $this->filesystem = $filesystem;
26 26
         $this->mappingLogRepository = $mappingLogRepository;
27 27
     
28
-        $this->mappingLogs = array_map(function ($log) {
28
+        $this->mappingLogs = array_map(function($log) {
29 29
             return $log['mapping'];
30 30
         }, $this->mappingLogRepository->all());
31 31
     }
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
     {
74 74
         $files = $this->filesystem->glob($path . DIRECTORY_SEPARATOR . '*.php');
75 75
         
76
-        return array_map(function (string $file) {
76
+        return array_map(function(string $file) {
77 77
             return str_replace('.php', '', basename($file));
78 78
         }, $files);
79 79
     }
Please login to merge, or discard this patch.
src/Business/Filler/EloquentFiller.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@  discard block
 block discarded – undo
19 19
     public function fill(Model $model, SearchResult $searchResult)
20 20
     {
21 21
         $searchResult->setHits(
22
-            $searchResult->getHits()->map(function (array $hit) use ($model) {
22
+            $searchResult->getHits()->map(function(array $hit) use ($model) {
23 23
                 return $this->fillModel($model, $hit);
24 24
             })
25 25
         );
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
      */
125 125
     protected function hydrateRecursive(Model $model, array $items)
126 126
     {
127
-        return $model->newCollection(array_map(function ($item) use ($model) {
127
+        return $model->newCollection(array_map(function($item) use ($model) {
128 128
             return $this->newFromBuilderRecursive($model, $item);
129 129
         }, $items));
130 130
     }
Please login to merge, or discard this patch.
src/Business/Helper/IsModelSearchable.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -19,7 +19,7 @@
 block discarded – undo
19 19
         $traits = class_uses_recursive(get_class($model));
20 20
         
21 21
         if (!isset($traits[Searchable::class])) {
22
-            throw new \InvalidArgumentException(get_class($model).' does not use the searchable trait.');
22
+            throw new \InvalidArgumentException(get_class($model) . ' does not use the searchable trait.');
23 23
         }
24 24
         
25 25
         return true;
Please login to merge, or discard this patch.
src/Searchable.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -39,14 +39,14 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public static function bootSearchable()
41 41
     {
42
-        static::saved(function (Model $model) {
42
+        static::saved(function(Model $model) {
43 43
             /** @var Model|Searchable $model */
44 44
             if ($model->shouldSyncDocument()) {
45 45
                 $model->repository()->save(/** @scrutinizer ignore-type */$model);
46 46
             }
47 47
         });
48 48
     
49
-        static::deleted(function (Model $model) {
49
+        static::deleted(function(Model $model) {
50 50
             /** @var Model|Searchable $model */
51 51
             if ($model->shouldSyncDocument()) {
52 52
                 $model->repository()->delete(/** @scrutinizer ignore-type */$model);
@@ -86,10 +86,10 @@  discard block
 block discarded – undo
86 86
     public function getDocumentType(): string
87 87
     {
88 88
         if (property_exists($this, 'documentType')) {
89
-            return (string)$this->documentType;
89
+            return (string) $this->documentType;
90 90
         }
91 91
         
92
-        return (string)$this->getTable();
92
+        return (string) $this->getTable();
93 93
     }
94 94
     
95 95
     /**
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     public function shouldSyncDocument() : bool
101 101
     {
102 102
         if (property_exists($this, 'syncDocument')) {
103
-            return (bool)$this->syncDocument;
103
+            return (bool) $this->syncDocument;
104 104
         }
105 105
         
106 106
         return true;
Please login to merge, or discard this patch.
src/Console/Commands/Mapping/Make.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -51,8 +51,7 @@
 block discarded – undo
51 51
         $mapping = $this->formatMappingName($this->argument('mapping'));
52 52
         
53 53
         $model = $this->option('model') ?
54
-            $this->formatModelName($this->option('model')) :
55
-            null;
54
+            $this->formatModelName($this->option('model')) : null;
56 55
         
57 56
         $this->filesystem->put(
58 57
             $this->buildMappingFilePath($mapping),
Please login to merge, or discard this patch.
database/migrations/0000_00_00_000000_create_triadev_mapping_log_table.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@
 block discarded – undo
13 13
      */
14 14
     public function up()
15 15
     {
16
-        Schema::create('triadev_mapping_log', function (Blueprint $table) {
16
+        Schema::create('triadev_mapping_log', function(Blueprint $table) {
17 17
             $table->increments('id');
18 18
             $table->string('mapping');
19 19
             $table->timestamps();
Please login to merge, or discard this patch.
src/Provider/ServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
         $this->loadMigrationsFrom(__DIR__ . '/../Resources/database/migrations');
56 56
     
57 57
         $this->publishes([
58
-            __DIR__.'/Resources/database' => database_path(),
58
+            __DIR__ . '/Resources/database' => database_path(),
59 59
         ], 'database');
60 60
         
61 61
         $this->commands([
Please login to merge, or discard this patch.
src/Model/SearchResult.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -32,12 +32,12 @@
 block discarded – undo
32 32
      */
33 33
     public function __construct(array $result)
34 34
     {
35
-        $this->took = (int)array_get($result, 'took');
36
-        $this->timedOut = (bool)array_get($result, 'timed_out');
37
-        $this->shards = (array)array_get($result, '_shards');
35
+        $this->took = (int) array_get($result, 'took');
36
+        $this->timedOut = (bool) array_get($result, 'timed_out');
37
+        $this->shards = (array) array_get($result, '_shards');
38 38
         $this->hits = new Collection(array_get($result, 'hits.hits'));
39
-        $this->totalHits = (int)array_get($result, 'hits.total');
40
-        $this->maxScore = (float)array_get($result, 'hits.max_score');
39
+        $this->totalHits = (int) array_get($result, 'hits.total');
40
+        $this->maxScore = (float) array_get($result, 'hits.max_score');
41 41
         $this->aggregation = array_get($result, 'aggregations', null);
42 42
     }
43 43
     
Please login to merge, or discard this patch.