Passed
Pull Request — master (#132)
by
unknown
03:48
created
src/Types/CreateInputType.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@
 block discarded – undo
49 49
         $fields = parent::getFillableFields();
50 50
         $defaults = $this->model->getAttributes();
51 51
 
52
-        return $fields->map(function (Field $field, string $key) use ($defaults) {
52
+        return $fields->map(function(Field $field, string $key) use ($defaults) {
53 53
             if (in_array($key, array_keys($defaults))) {
54 54
                 return $field->nullable();
55 55
             }
Please login to merge, or discard this patch.
src/Types/Concerns/InteractsWithPolymorphism.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,11 +39,11 @@
 block discarded – undo
39 39
     public function getModelSchemas(): Collection
40 40
     {
41 41
         Utils::invariant(
42
-            ! empty($this->modelSchemas),
42
+            !empty($this->modelSchemas),
43 43
             'No model schemas defined on "'.get_class($this).'"'
44 44
         );
45 45
 
46
-        return collect($this->modelSchemas)->map(function (string $class) {
46
+        return collect($this->modelSchemas)->map(function(string $class) {
47 47
             return $this->registry->getModelSchema($class);
48 48
         });
49 49
     }
Please login to merge, or discard this patch.
src/Types/CreateUnionEntityInputType.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
             $inputType = 'Create'.$modelSchema->typename().'Input';
23 23
 
24 24
             $fields[Utils::single($modelSchema->typename())] = $this->registry->field($inputType)->nullable();
Please login to merge, or discard this patch.
src/Utils/Utils.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -14,7 +14,7 @@
 block discarded – undo
14 14
      */
15 15
     public static function invariant($test, $message = '', ...$args)
16 16
     {
17
-        if (! $test) {
17
+        if (!$test) {
18 18
             if (count($args)) {
19 19
                 $message = sprintf($message, $args);
20 20
             }
Please login to merge, or discard this patch.
src/BakeryServiceProvider.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      */
31 31
     protected function registerRoutes()
32 32
     {
33
-        if (! config('bakery.path')) {
33
+        if (!config('bakery.path')) {
34 34
             return;
35 35
         }
36 36
 
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
      */
76 76
     protected function registerBakery()
77 77
     {
78
-        $this->app->singleton(Bakery::class, function () {
78
+        $this->app->singleton(Bakery::class, function() {
79 79
             $bakery = new Bakery();
80 80
 
81 81
             $this->registerSecurityRules();
Please login to merge, or discard this patch.
src/Support/Arguments.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
      */
33 33
     public function offsetGet($offset)
34 34
     {
35
-        if (! $this->offsetExists($offset)) {
35
+        if (!$this->offsetExists($offset)) {
36 36
             return null;
37 37
         }
38 38
 
Please login to merge, or discard this patch.
src/Support/RootMutation.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@
 block discarded – undo
29 29
     {
30 30
         $fields = collect($this->fields);
31 31
 
32
-        return $fields->map(function (RootField $field) {
32
+        return $fields->map(function(RootField $field) {
33 33
             return $field->toArray();
34 34
         });
35 35
     }
Please login to merge, or discard this patch.
src/Support/TypeRegistry.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@
 block discarded – undo
249 249
     {
250 250
         $type = $this->getType($name);
251 251
 
252
-        if (! $type) {
252
+        if (!$type) {
253 253
             throw new TypeNotFound('Type '.$name.' not found.');
254 254
         }
255 255
 
Please login to merge, or discard this patch.
src/Support/Schema.php 2 patches
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -198,9 +198,9 @@  discard block
 block discarded – undo
198 198
                 $types = $types->merge($this->getPivotModelTypes($schema));
199 199
             } else {
200 200
                 $types->push(new Types\EntityType($this->registry, $schema))
201
-                      ->push(new Types\EntityLookupType($this->registry, $schema))
202
-                      ->push(new Types\CollectionFilterType($this->registry, $schema))
203
-                      ->push(new Types\CollectionOrderByType($this->registry, $schema));
201
+                        ->push(new Types\EntityLookupType($this->registry, $schema))
202
+                        ->push(new Types\CollectionFilterType($this->registry, $schema))
203
+                        ->push(new Types\CollectionOrderByType($this->registry, $schema));
204 204
 
205 205
                 if ($schema->isSearchable()) {
206 206
                     $types->push(new Types\CollectionSearchType($this->registry, $schema));
@@ -208,12 +208,12 @@  discard block
 block discarded – undo
208 208
 
209 209
                 if ($schema->isIndexable()) {
210 210
                     $types->push(new Types\EntityCollectionType($this->registry, $schema))
211
-                          ->push(new Types\CollectionRootSearchType($this->registry, $schema));
211
+                            ->push(new Types\CollectionRootSearchType($this->registry, $schema));
212 212
                 }
213 213
 
214 214
                 if ($schema->isMutable()) {
215 215
                     $types->push(new Types\CreateInputType($this->registry, $schema))
216
-                          ->push(new Types\UpdateInputType($this->registry, $schema));
216
+                            ->push(new Types\UpdateInputType($this->registry, $schema));
217 217
                 }
218 218
             }
219 219
 
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     protected function getModelTypes(): Collection
193 193
     {
194
-        return $this->getModels()->reduce(function (Collection $types, string $class) {
194
+        return $this->getModels()->reduce(function(Collection $types, string $class) {
195 195
             $schema = $this->registry->getModelSchema($class);
196 196
 
197 197
             if ($schema->getModel() instanceof Pivot) {
@@ -218,26 +218,26 @@  discard block
 block discarded – undo
218 218
             }
219 219
 
220 220
             // Filter through the regular fields and get the polymorphic types.
221
-            $schema->getFields()->filter(function ($field) {
221
+            $schema->getFields()->filter(function($field) {
222 222
                 return $field instanceof PolymorphicField;
223
-            })->each(function ($field, $key) use ($schema, &$types) {
223
+            })->each(function($field, $key) use ($schema, &$types) {
224 224
                 $types = $types->merge($this->getPolymorphicFieldTypes($schema, $key, $field));
225 225
             });
226 226
 
227 227
             // Filter through the relations of the model and get the
228 228
             // belongsToMany relations and get the pivot input types
229 229
             // for that relation.
230
-            $schema->getRelations()->filter(function ($relation) {
230
+            $schema->getRelations()->filter(function($relation) {
231 231
                 return $relation instanceof BelongsToMany;
232
-            })->each(function ($relation) use (&$types) {
232
+            })->each(function($relation) use (&$types) {
233 233
                 $types = $types->merge($this->getPivotInputTypes($relation));
234 234
             });
235 235
 
236 236
             // Filter through the relation fields and get the the
237 237
             // polymorphic types for the relations.
238
-            $schema->getRelationFields()->filter(function ($field) {
238
+            $schema->getRelationFields()->filter(function($field) {
239 239
                 return $field instanceof PolymorphicField;
240
-            })->each(function ($field, $key) use ($schema, &$types) {
240
+            })->each(function($field, $key) use ($schema, &$types) {
241 241
                 $types = $types->merge($this->getPolymorphicRelationshipTypes($schema, $key, $field));
242 242
             });
243 243
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
         foreach ($this->getModels() as $modelSchema) {
366 366
             $modelSchema = $this->registry->getModelSchema($modelSchema);
367 367
 
368
-            if (! $modelSchema->getModel() instanceof Pivot) {
368
+            if (!$modelSchema->getModel() instanceof Pivot) {
369 369
                 $entityQuery = new SingleEntityQuery($this->registry, $modelSchema);
370 370
                 $queries->put($entityQuery->getName(), $entityQuery);
371 371
 
@@ -410,11 +410,11 @@  discard block
 block discarded – undo
410 410
         foreach ($this->getModels() as $class) {
411 411
             $modelSchema = $this->registry->getModelSchema($class);
412 412
 
413
-            $pivotRelations = $modelSchema->getRelations()->filter(function ($relation) {
413
+            $pivotRelations = $modelSchema->getRelations()->filter(function($relation) {
414 414
                 return $relation instanceof BelongsToMany;
415 415
             });
416 416
 
417
-            if ($modelSchema->isMutable() && ! $modelSchema->getModel() instanceof Pivot) {
417
+            if ($modelSchema->isMutable() && !$modelSchema->getModel() instanceof Pivot) {
418 418
                 $createMutation = new CreateMutation($this->registry, $modelSchema);
419 419
                 $mutations->put($createMutation->getName(), $createMutation);
420 420
 
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
         $config->setDirectives(array_merge(Directive::getInternalDirectives(), $this->directives()));
516 516
 
517 517
         // Set the type loader
518
-        $config->setTypeLoader(function ($name) use ($query, $mutation) {
518
+        $config->setTypeLoader(function($name) use ($query, $mutation) {
519 519
             if ($name === $query->name) {
520 520
                 return $query;
521 521
             }
Please login to merge, or discard this patch.