Passed
Push — master ( b08012...15ce94 )
by Erik
05:21
created
src/Types/CollectionFilterType.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
             ->put('AND', $this->registry->field($this->registry->type($this->name()))->list())
54 54
             ->put('OR', $this->registry->field($this->registry->type($this->name()))->list());
55 55
 
56
-        return $fields->map(function (Field $type) {
56
+        return $fields->map(function(Field $type) {
57 57
             return $type->nullable()->nullableItems();
58 58
         })->toArray();
59 59
     }
@@ -67,9 +67,9 @@  discard block
 block discarded – undo
67 67
     {
68 68
         $fields = $this->modelSchema->getFields();
69 69
 
70
-        return $fields->reject(function (Field $field) {
70
+        return $fields->reject(function(Field $field) {
71 71
             return $field instanceof PolymorphicField;
72
-        })->keys()->reduce(function (Collection $result, string $name) use ($fields) {
72
+        })->keys()->reduce(function(Collection $result, string $name) use ($fields) {
73 73
             $field = $fields->get($name);
74 74
 
75 75
             return $field->getType()->isLeafType() ? $result->merge($this->getFilters($name, $field)) : $result;
@@ -85,9 +85,9 @@  discard block
 block discarded – undo
85 85
     {
86 86
         $fields = $this->modelSchema->getRelationFields();
87 87
 
88
-        return $fields->filter(function (Field $field) {
88
+        return $fields->filter(function(Field $field) {
89 89
             return $field instanceof EloquentField;
90
-        })->keys()->reduce(function (Collection $result, string $name) use ($fields) {
90
+        })->keys()->reduce(function(Collection $result, string $name) use ($fields) {
91 91
             $field = $fields->get($name);
92 92
 
93 93
             return $result->put($name, $this->registry->field($this->registry->type($field->name().'Filter')));
Please login to merge, or discard this patch.
src/Types/AttachUnionEntityInputType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function fields(): array
20 20
     {
21
-        return $this->getModelSchemas()->reduce(function (array $fields, ModelSchema $modelSchema) {
21
+        return $this->getModelSchemas()->reduce(function(array $fields, ModelSchema $modelSchema) {
22 22
             $key = Utils::single($modelSchema->typename());
23 23
             $fields[$key] = $this->registry->field($this->registry->ID())->nullable();
24 24
 
Please login to merge, or discard this patch.
src/Types/EloquentMutationInputType.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -27,8 +27,8 @@  discard block
 block discarded – undo
27 27
     protected function getFillableFields(): Collection
28 28
     {
29 29
         return $this->modelSchema->getFillableFields()
30
-            ->filter(function (Field $field) {
31
-                return ! $field instanceof PolymorphicField && $field->setRegistry($this->registry)->getType()->isLeafType();
30
+            ->filter(function(Field $field) {
31
+                return !$field instanceof PolymorphicField && $field->setRegistry($this->registry)->getType()->isLeafType();
32 32
             });
33 33
     }
34 34
 
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
     {
42 42
         $relations = $this->modelSchema->getFillableRelationFields();
43 43
 
44
-        return $relations->keys()->reduce(function (Collection $fields, $key) use ($relations) {
44
+        return $relations->keys()->reduce(function(Collection $fields, $key) use ($relations) {
45 45
             $field = $relations[$key];
46 46
 
47 47
             if ($field instanceof EloquentField) {
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
         $pivot = $relation->getPivotClass();
136 136
         $relationName = $relation->getRelationName();
137 137
 
138
-        if (! $this->registry->hasSchemaForModel($pivot)) {
138
+        if (!$this->registry->hasSchemaForModel($pivot)) {
139 139
             return collect();
140 140
         }
141 141
 
Please login to merge, or discard this patch.
src/Types/UnionEntityType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
      */
19 19
     public function types(): array
20 20
     {
21
-        return collect($this->modelSchemas)->map(function ($modelSchema) {
21
+        return collect($this->modelSchemas)->map(function($modelSchema) {
22 22
             return $modelSchema instanceof RootType
23 23
                 ? $modelSchema
24 24
                 : $this->registry->type($this->registry->getModelSchema($modelSchema)->typename());
Please login to merge, or discard this patch.
src/Types/Definitions/UnionType.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
         return [
77 77
             'name' => $this->name(),
78
-            'types' => collect($this->types())->map(function (RootType $type) {
78
+            'types' => collect($this->types())->map(function(RootType $type) {
79 79
                 return $type->toNamedType();
80 80
             })->toArray(),
81 81
             'resolveType' => [$this, 'getTypeResolver'],
Please login to merge, or discard this patch.
src/Types/Definitions/ObjectType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@
 block discarded – undo
35 35
     {
36 36
         $fields = collect($this->fields());
37 37
 
38
-        return $fields->map(function (Field $field) {
38
+        return $fields->map(function(Field $field) {
39 39
             return $field->toArray();
40 40
         });
41 41
     }
Please login to merge, or discard this patch.
src/Types/Definitions/InputType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@
 block discarded – undo
18 18
     {
19 19
         $fields = collect($this->fields());
20 20
 
21
-        return $fields->map(function (Field $field) {
21
+        return $fields->map(function(Field $field) {
22 22
             return $field->getType()->toType();
23 23
         });
24 24
     }
Please login to merge, or discard this patch.
src/Types/CollectionSearchType.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -25,11 +25,11 @@
 block discarded – undo
25 25
      */
26 26
     public function fields(): array
27 27
     {
28
-        $fields = $this->modelSchema->getSearchableFields()->map(function (Field $field) {
28
+        $fields = $this->modelSchema->getSearchableFields()->map(function(Field $field) {
29 29
             return $this->registry->field($this->registry->boolean())->nullable();
30 30
         });
31 31
 
32
-        $relations = $this->modelSchema->getSearchableRelationFields()->map(function (EloquentField $field) {
32
+        $relations = $this->modelSchema->getSearchableRelationFields()->map(function(EloquentField $field) {
33 33
             $searchTypeName = $field->getName().'Search';
34 34
 
35 35
             return $this->registry->field($searchTypeName)->nullable();
Please login to merge, or discard this patch.
src/Types/UpdateInputType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
      */
51 51
     protected function getFillableFields(): Collection
52 52
     {
53
-        return parent::getFillableFields()->map(function (Field $field) {
53
+        return parent::getFillableFields()->map(function(Field $field) {
54 54
             return $field->nullable();
55 55
         });
56 56
     }
Please login to merge, or discard this patch.